The Johnny-Five sensor events

The two main events we'll see from sensors are data and change. The only real difference is in the name: data events are fired every time data is retrieved, while change is fired when the data changes. I tend to use change when building sensor-based projects unless I'm distinctly logging data over time.

You can configure the time between data collection in the construction of the sensor object, as well as the threshold that the change in data must pass in order to fire the change event.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.104.29