Quote:
|
Originally Posted by Neal Turett
Thanks guys. I found a way to do it. Took some experimenting, but here it is:
Run the sensor output into digital inputs 2 and 3. Have interupt on 2 for the rising edge and one for the falling edge. The first starts the timer, the second reads it out and scales it.
I haven't actually tried this - I'll probably fool with it post-build season, but I was just thinking ahead since my team doesn't let me touch the bot. Something about building it....
|
You don't have to do it like that. Dig I/O pins 3-6 are interrupt on change, so just plug it into dig io pin 3 and when RBIF triggers check to see that it is indeed pin 3 that changed (since 3-6 all trigger the same flag). You can sense both rising and falling edges on the same pin.