You are reading a single comment by @DrAzzy and its replies. Click here to read the full conversation.
  • Are there plans to extend setWatch() to allow reacting to an analog input value? Does the chip the Espruino uses even have a good way to do that? Or is it better to wire up something to convert that event into a digital pulse and set a watch on that?

    For example, to put a watch on the results of an analog sensor, so if it went over a certain value, it'd call the function? (This is easy enough to handle w/discrete components - a '339 and a pair of dividing resistors to make a reference can handle detecting if it's above or below a threshold)

    Or to use one of those ultra-cheap chinese "vibration sensors" to detect shocks? (the 20 cent ones that look kinda like blue resistors. When tapped or shaken, the resistance changes randomly). This I think could also be used with a 339 to get a digital output from it in the event of changes.

About

Avatar for DrAzzy @DrAzzy started