You'll get a 'connection' object (no need to call close on it) - you can then just do that again, and again, to connect to more devices. I think the max allowed might be 6.
I don't think you can do that all from one function call - so what I did for the demo was I had a 'connect' button on the webpage. Click it once and it connects to a puck and adds it to an array, click it again and then you have 2 pucks in the array, and so on.
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.
Sure - with Web Bluetooth it's just a matter of calling the
requestDevice
function again, however with thePuck.js
helper you have to use it in a slightly different way: https://github.com/espruino/espruino.github.io/blob/master/js/puck.jsIf you do:
You'll get a 'connection' object (no need to call
close
on it) - you can then just do that again, and again, to connect to more devices. I think the max allowed might be 6.I don't think you can do that all from one function call - so what I did for the demo was I had a 'connect' button on the webpage. Click it once and it connects to a puck and adds it to an array, click it again and then you have 2 pucks in the array, and so on.
I'll make a note to do a proper tutorial on it :)