View Single Post
  #8   Spotlight this post!  
Unread 13-01-2007, 20:19
mluckham's Avatar
mluckham mluckham is offline
Registered User
FRC #0758 (Sky Robotics)
Team Role: Mentor
 
Join Date: Mar 2006
Rookie Year: 2006
Location: Ontario, Canada
Posts: 116
mluckham will become famous soon enoughmluckham will become famous soon enough
Re: Help with the Kit Gear Tooth sensors

According to the 2007 Sensor Manual the sensor outputs a pulse, but as chris31 says the sensor should be wired to a digital input port and use interrupts - see Kevin Watson's code.

If you just try to "poll" for the state of the sensor in user_routines or even user_routines_fast, you will miss most of the pulses. Using interrupt method guarantees the pulse will be counted.

Last year we mounted the sensor securly inside the tranmission gearbox - no problems.