|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Pneumatic Programming
I have recently gotten a pneumatic kit for my Vex robot, but am still a little unsure on how to program it. I came up with this though:
Int Channel 5=0 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): I think my problem is with my variable, "Channel5". I don't know what properties I should use for it. If you know any information that I may be missing then your help would be greatly appreciated. |
|
#2
|
||||
|
||||
|
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): } } Last edited by Kingofl337 : 25-02-2010 at 15:56. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| pneumatic problem | koka230 | Pneumatics | 8 | 06-02-2009 02:01 |
| Programming in Python and Explaination of Programming | roboxking | Programming | 22 | 07-01-2008 16:08 |
| pneumatic programming | stephenthe1 | Programming | 5 | 16-02-2006 12:01 |
| programming motors with programming kit | BorisTheBlade | FIRST Tech Challenge | 4 | 01-11-2005 19:03 |
| Pneumatic Programming | Will Chan | Programming | 2 | 11-02-2003 22:49 |