As far as I know the current draw when using setWatch is basically the same 20uA as without. I actually test with a strip of flexible double-sided PCB stuck between the battery and the board, so you don't need soldering... You could probably hack something up with 2 bits of tin foil and some sellotape if you desperately wanted.
In the demo I did for the KickStarter I actually had a Web Bluetooth webpage connected to all 4 Pucks - so in that case it wouldn't have run on its own. Again, that's something I'll try and do a tutorial for soon.
The nRF52832 in Puck.js can handle multiple outbound connections (possibly only 4 though?), but at the moment you're limited to 1. Having more means you have to reserve more RAM at compile time - so less space for JS code for everyone :(
However there are other ways of doing this. For example, you could have every Puck advertising whether it had been pressed or not (which doesn't use any noticeable power). One master Puck (or other device) could then be listening for the advertising packets, and could turn the next Puck on (by connecting) when the first one was pressed.
Only gotcha there is to 'wake up' the game you'd have to tap the 'master' Puck first (since having it listening for advertising packets all the time would drain the battery) - but that's not a huge problem.
Hi @Gordon, thanks for the info. So I guess trying the advertisement way is something I will do next. And I will check the tin foil approach, that might be easiest, indeed.
One thing I don't understand is how to use the Web Bluetooth with multiple Pucks. I did not find a way to connect to more than one from the same web page. Could you elaborate on that a bit?
© Espruino, powered by microcosm.
Report a problem