|
Re: Using Interrupts or DMA or timing to control digital I/O switch
I think the simplest solution for you would be to use the DIO pin as the input to a Counter. That way you won't need to rely on reading the state of the pin at the precise moment the sensor is detecting the hole. Just reset the counter before you run the drum, then watch the output of the counter and take appropriate action when it has counted the pulse. You might end up reacting slightly later than you think you should, but that's better than not reacting at all.
|