View Single Post
  #1   Spotlight this post!  
Unread 08-02-2008, 20:19
Sykan's Avatar
Sykan Sykan is offline
Lead Programmer
AKA: David
FRC #0540 (Team 540)
Team Role: Engineer
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Virginia
Posts: 24
Sykan is on a distinguished road
KOP Gear Tooth Encoder Trouble

I'm not exactly sure how the encoder works but I've been trying to test it with kevin's code. i think i've cover all the bases. i uncommented the Initialize in the teleop.c, uncommented the define in the encoder.h file, uncommented the interrupt in the ifi_frc.h and uncommented the encoder counter printf.

I have the gear tooth sensor to a 12 volt source and a 30 fuse though the white(+) and ground(-) to power it. and a pwm connected to the Rc digital input 11.

When i placed the encoder next to a spinning gear. the Counter printf was a solid 0 the whole time

I went on to print out the value of the digital input it starts out as 0 as soon as I put a metal object and it changes to 1 but when i move the object away it doesn't change back. like i said i don't know if this is normal operation.

I also had a question about the holes in the gear box i read some where that the two holes at an angle on the side were for this encoder but it neither fits nor is close enough to read the gear.. unless it need to be far away for the gear?

Thank you for any light you maybe able to shed on the situation.

~David Elizondo