Thread: Gear Sensor
View Single Post
  #2   Spotlight this post!  
Unread 13-02-2006, 14:58
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
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.