View Single Post
  #9   Spotlight this post!  
Unread 05-01-2007, 23:27
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
Lightbulb Re: Why it works with an underscore?

Is it possible to define something and have a set of commands built into it?

Something like this?

#define Setting_1 ((solenoid1 = 1) && (Solenoid2 = 0) && (solenoid3 = 1) && (solenoid4 = 0) && (solenoid5 = 0) && (solenoid6 = 0));

will this allow me to do....

if (Sensors_are_online);
{
Setting_1
}


basically if the sensor receives a signal, it would turn on setting_1 which is to turn solenoid 1 and solenoid 3 on.