Thread: GTS Code
View Single Post
  #2   Spotlight this post!  
Unread 06-02-2008, 22:13
usbcd36's Avatar
usbcd36 usbcd36 is offline
Registered User
AKA: "DOS"
FRC #2399 (The Fighting Unicorns)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2006
Location: Solon, OH
Posts: 151
usbcd36 is a jewel in the roughusbcd36 is a jewel in the roughusbcd36 is a jewel in the rough
Re: GTS Code

Kevin's code can be easily modified to use simple gear tooth sensors instead of quadrature encoders. All you need to do is open the encoder.c file and remove the code that uses the second phase.

You'll probably be using two sensors, so you need to do this to both. Find the functions in encoder.c called Encoder_n_Int_Handler, where n stands for the digital port you're using for that sensor. Modify it to look like so:

Code:
void Encoder_n_Int_Handler(void)
{
		Encoder_n_Count += ENCODER_n_TICK_DELTA;
}
Should be fairly simple to do this.