Go to Post "Splet" is the sound a frog makes when it hits pavement at 187 feet per second. Don't ask me how I know. - dlavery [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 18-02-2010, 20:41
!Kevin! !Kevin! is offline
Registered User
VRC #1588
 
Join Date: Feb 2010
Location: Idaho
Posts: 1
!Kevin! is an unknown quantity at this point
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   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.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

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


All times are GMT -5. The time now is 16:48.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi