Gear Sensor

Anyoe now how to use/get the input from the gear tooth sensor? What I’m trying to do is make sure a gear doesn’t drop below a certain speed. Any relavant tips would be great.

Connect its output to a digital input (any of 1 through 6) on the Robot Controller, then configure the input to cause an interrupt. Increment a counter whenever the interrupt occurs. Separately configure a repeating timer interrupt. Each time the timer goes off, save the value of the gear tooth counter and then reset it to zero for the start of the next time period.

That’s the short version. If you don’t understand interrupts, ask again.

I dont understand the interrupts, can you please explain it to me?

See the thread at for information on how to count gear teeth using interrupts. Pay special attention to the post by b_mallerd.

For using timer interrupts, see the Timers White Paper: