View Single Post
  #2   Spotlight this post!  
Unread 23-02-2007, 10:49
seanl's Avatar
seanl seanl is offline
"The Everything person"
FRC #0867 (Absolute Value)
Team Role: Leadership
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Arcadia, CA
Posts: 267
seanl will become famous soon enoughseanl will become famous soon enough
Re: PROGRAMMING PNEUMATICS

Quote:
Originally Posted by dominic.danna View Post
But how would you program to turn the switch on and off with the click of the trigger

Would it be

if (p1_sw_trig == 1)
{
relay2_fwd = 1; //to go
}
else
{
relay3_fwd = 0; //to stop
}

would this work for having the switch be in relay2 for on and relay3 is for the switch off. Thanks
if your going to do that you will have to hold the trigger while you want that action. your going to need a much more complicated code to have it switch on by pressing the trigger once.and have your device turn on.