View Single Post
  #8   Spotlight this post!  
Unread 05-01-2007, 18:30
Generalx5's Avatar
Generalx5 Generalx5 is offline
Hard Core Inventor
AKA: Jun(John) Zheng
FRC #1346 (Trobotics)
Team Role: Student
 
Join Date: Nov 2005
Rookie Year: 2004
Location: CANADA
Posts: 94
Generalx5 will become famous soon enough
Question Re: Why it works with an underscore?

Do I #define a name that I want to use and then in the routines use them there?

Can I:

#define *Sensor_variable read* results in turning on solenoid 1 and 4 and 5


then later if this happens:

if ((Sen_1 == 1) && (Sen_2 == 1) && (Sen_3 == 1) && (Sen_4 == 1) && (Sen_5 == 1))
{
Sensor_variable read;
}


This way I can activate certain solenoids when my 5 sensors reads all 1's

its soooo confusing...still trying to make the encoder work.