Yes, absolutely - all you have to do is mash the two together for a 'middle' repeater:
function setFound(found) {
NRF.setAdvertising({},{manufacturer:0x590,manufacturerData:[found ? 1 : 0]});
}
NRF.requestDevice({ timeout:1000, filters: [{ name: 'Puck.js repeater' }] }).then(function(device) {
// repeater found
setFound(device.manufacturerData[0]);
}).catch(function(e) {
// repeater not found
setFound(false);
});
It's worth noting that you could modify this pretty easily to send the status of more than one device (or even some data from another Espruino) by just putting multiple elements in the manufacturerData array.
is MDBT42Q with Espruino JavaScript interpreter pre-installed, able to be a repeater or an endpoint ?
It can do anything the Puck does, so yes - it can be either.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Yes, absolutely - all you have to do is mash the two together for a 'middle' repeater:
It's worth noting that you could modify this pretty easily to send the status of more than one device (or even some data from another Espruino) by just putting multiple elements in the
manufacturerData
array.It can do anything the Puck does, so yes - it can be either.