View Single Post
  #1   Spotlight this post!  
Unread 25-01-2008, 22:54
Nuggets08 Nuggets08 is offline
Registered User
FRC #1737 (Project X Robotics)
Team Role: Programmer
 
Join Date: Feb 2007
Rookie Year: 2006
Location: Excelsior Springs, MO
Posts: 11
Nuggets08 is on a distinguished road
This darn Gear Tooth Sensor

Alright, my team has been around for 3 years this year. I have been head programmer all three years. Now basically, our programming has been relatively simple in the past years. I have gotten a feel for how the PIC works, and the code's architecture, but there is something I have never touched: Interrupts.
Looking into Chief Delphi, looking for answers, I found things saying that you need to use interrupts to get the input from the Gear Tooth Sensor. This is a lot more programming than I anticipated at first for this thing. I was hoping for a simple check on rc_dig_in01, but that doesn't work. I found this out by trying it, and then looking on here to see why.

Alright, I'm rambling. Onto my question:
How can I use interrupts to tell when the GTS pulses? I don't care what direction it is spinning, I am combining the GTS and the gyro, to get a heading of the robot. I am just merely finding the distance traveled by one wheel, and then doing the same on the other wheel.
Thank you!
--Adam
__________________
-Nuggets
Project X Robotics
Team 1737
Excelsior Springs, MO
Attending: KC-Metro Regional
Project Manager, Lead Programmer