Cleaner way to read interrupts from GPIO?

Started by omav, December 06, 2012, 03:14:16 PM

Previous topic - Next topic

omav

Hey,

We are working on a robot with a few students, using the OlinuXinO Maxi as our heart. On our motors we have encoders to measure the RPM of the wheels, so we can reasonably accurately calculate the distance, however, we can't really seem to find a nice and clean way to read the interrupts from the GPIO ports that the encoders are hooked up to.

we can read it perfectly with:
/proc/interrupts | grep gpio

But is there a more clean way to do this? preferably in C++?

Thanks!