I know I'm not the first person to want this - and I've seen a lot of posts alluding to this, but I can't figure out how to get this to work. If anyone has any code segment they'd be willing to share it would be much appreciated.
On the SBC (or any Phidget 8/8/8) when the OutputChangeHandler picks up a change (eg; #2 sensor goes high) I'd like to wait for 12 seconds, and if the sensor does not get reset to low by another process, then I'd like to set that sensor back to low.
Obviously putting a "sleep" or "wait" in the OutputChangeHandler would not be a good idea because I don't want to hang the handler from processing other changes. But apparently I'm missing some important concept, because I just can't figure out how to properly code this. My guess is that I need to spawn a thread waiting for the change, signaled by the OutputChangeHandler, then have that thread "sleep" before setting the sensor back to low, allowing the OutputChangeHandler to keep working in the meantime. So, if anyone has actually done this and wouldn't mind sharing a code snippet, I'm sure quite a few people would really appreciate it.
Thanks in advance to anyone who can respond!