hybridgroup / cylon

JavaScript framework for robotics, drones, and the Internet of Things (IoT)
https://cylonjs.com
Other
4.2k stars 360 forks source link

Catch if connection is failed #369

Open facetime88 opened 7 years ago

facetime88 commented 7 years ago

I am connecting Arduino with javascript via Cylon and works great.

If the connection is established, it will run the work function block. However, I'd like also to catch if the connection is fail and doing some other functions.

How do I catch the fail connection?