View Single Post
  #2   Spotlight this post!  
Unread 25-02-2010, 15:54
Kingofl337's Avatar
Kingofl337 Kingofl337 is offline
You didn't see anything....
AKA: Adam
FRC #0501 (Power Knights)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 1998
Location: Manchester, NH
Posts: 861
Kingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond repute
Send a message via Yahoo to Kingofl337
Re: Pneumatic Programming

You forgot a "=" in your if. You may want to use Timer though as the wait statement will stall your drive code.


while (1) //Insert Your RC Code Below
{
Channel5=Get RxInput (1,5):
if (Channel5 == 0) {
Set Digital Output (16,1):
Wait (1000)
Set Digital Output (16,0):
}
}

This would work better

while (1) //Insert Your RC Code Below
{
Channel5=Get RxInput (1,5):
if (Channel5 == 0) {
Set Digital Output (16,1):
} else {
Set Digital Output (16,0):
}
}
__________________
FIRST Team 501 PowerKnights - Mentor
FIRST Team 40 Checkmate - Mentor Alum
FIRST Team 146 Blue Lightning - Alumni

Last edited by Kingofl337 : 25-02-2010 at 15:56.