Thread: Gear Tooth Code
View Single Post
  #1   Spotlight this post!  
Unread 18-02-2007, 23:19
magical hands magical hands is offline
Jigar Patel
AKA: Jigar Patel
FRC #2185 (Etobicoke CI)
Team Role: Mentor
 
Join Date: Dec 2003
Rookie Year: 2004
Location: TORONTO
Posts: 93
magical hands is on a distinguished road
Gear Tooth Code

Can someone tell me why this code wouldn't work for Gear Tooth Sensor. To me it makes sense because its connected to digital input and it only gives 0 or 1 based on the voltage (5v).

int i = 0;

If (rc_dig_in01 == 1) //Gear Tooth Attached to dig_input 1
{
i++; // Gear Counter
printf("Gear counter=%d\r\n", i);
}