Try adding a delay between disconnecting from one puck and connecting to the other. Disconnect starts a disconnect but it takes some time to complete, and the web Bluetooth spec doesn't seem to remove a return a promise.
Unfortunately notifications aren't implemented yet, so you can't get the result. It'll be in a firmware update in the new year though
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.
Try adding a delay between disconnecting from one puck and connecting to the other. Disconnect starts a disconnect but it takes some time to complete, and the web Bluetooth spec doesn't seem to remove a return a promise.
Unfortunately notifications aren't implemented yet, so you can't get the result. It'll be in a firmware update in the new year though