Hi, I was trying to read raw values from a gyro and was using analog_in on the triport. Seems that the changed() callback has some threshold on the magnitude of the difference in readings. When i just put a loop spinning on a timer, I see the raw value bouncing around quite a bit (as expected), but the callback does not get triggered unless the difference between readings is ~5 from what I can tell (comparing12bit values). I assume this is intended behavior?
yes, but the event should be triggered if the delta is > 2.
Edit: actually looks it’s a delta of > 2 in a 10mS time period, so if the value is changing really slowly it doesn’t generate an event. I have no idea why we decided to do it that way, code was committed 6 years ago. I don’t think anyone ever uses these events.