You are reading a single comment by @Robin and its replies.
Click here to read the full conversation.
-
Wed 2021.09.08
Hi @Jeff One idea might be to have the Puck regularly signal the web page, and have the web page continually look for that 'ping'. Within a try/catch block, when the ping doesn't arrive timely, throw and trap an exception within the web page itself.
Example bi-directional comm examples here:
https://www.espruino.com/Web%20Bluetooth
https://www.puck-js.com/go
Hello all,
I am a newbie and appreciate any help. I have tried generating a solution but have lost much hair trying!
I connect to the puck from a Windows browser using the following javascript function and query the accelerometer with a timer using the subsequent function. How can I detect if the puck.js disconnects?
Thanks in advance,
Jeff