Pin Capture vs Interrupt on Panda II

As the photoelectric sensor uses …EdgeBoth the glitch filter does not work. So I didn’t bother to try it. I prefer to get both edges of the pulse, than having a single call of the interrupt handler. Getting later more advance with the program - and the hardware - the two edges could be used to measure the velocity at the bottom position. Then g can be calculated, if the mass of the pendulum is known.

I see. I wasn’t sure what your application was. If just detecting motion then it wouldn’t really matter. In your case it certainly does. Sounds like you have it working good enough now though :slight_smile: