|
Re: Gear Sensor
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.
|