I have a 10-turn 20k trimpot connected between 5V and Gnd with the wiper connected to Analog1. I can see the voltage for Analog1 vary when I run sensor.py, but I get no output from analog-event.py.
Is there more information about analog changed() beyond:
“changed( handler_function, sensitivity ) - Calls “handler_function” when a change greater than the threshold millivolts occurs”?
What is the time period for the change? My trimpot might be too slow to adjust?
There is no sensitivity value in analog-event.py; what is the default value? Adding a small value (1) has not made a difference in my case.
I’m hoping to monitor an analog pressure transducer on a well pump with this, and the value varies slowly. I can find other ways to alert me to values of interest, but this seemed like a interesting way to do it.
Thanks for your rapid reply! That sounds like the kind of info I’m looking for - can you give a link so I can read more?
The sensitivity unit would be volts, with a default of one millivolt if I understand correctly. I was confused by the mention of ‘threshold millivolts’.
Trying the values you suggested does indeed bring results. It looks like it would be useful for rapid changes (checked every 10 mS) rather than the slower changes for the signal I’m following. I’d like to look further into the library.