View Single Post
  #3   Spotlight this post!  
Unread 29-02-2004, 21:21
Greg's Avatar
Greg Greg is offline
Registered User
FRC #1075 (Sinclair Sprockets)
Team Role: College Student
 
Join Date: Nov 2002
Rookie Year: 2003
Location: Whitby, Ontario, Canada
Posts: 108
Greg is on a distinguished road
Send a message via ICQ to Greg Send a message via MSN to Greg
Re: Optical Sensors Used as Encoders?

I dont think this use of tape is allowed by the rules. Last year we used some white paint on a black gear. This year we drilled holes in the gear and put an aluminum plate behind the hole opposite the sensor. It works very well (and we took some weight off doing that )

As for code... Wire the sensors to interrupts (digital pins 1 and 2). You can find some examples in the IR beacon tracker code. Last year I polled the sensors every program cycle and it did not work too well (not fast enough). The interrupt method works perfectly.

And dont forget to use the normally high output of the sensors