You are reading a single comment by @DrAzzy and its replies. Click here to read the full conversation.
  • I've noticed this kind of behavior as well.

    Look at your data more closely - you're getting spurious callbacks while it's false... But when the signal goes high (which consistently happens every 20ms, just like it should for a 50hz signal), it is consistently followed by a record with the signal going low about 1ms (ie, 0.9 and a margin of error) later.

    Why not record the state of the last call, and discard any call that has the same state as the last one?

    (Edit: Oops - meant to just make that a normal post, not "in reply to...")

About

Avatar for DrAzzy @DrAzzy started