Go to Post [In FIRST]...Arab and Israeli students speak on the same level, because they are alliance partners. - Tottanka [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Spotlight this post!  
Unread 27-05-2003, 17:13
Joe Johnson's Avatar Unsung FIRST Hero
Joe Johnson Joe Johnson is offline
Engineer at Medrobotics
AKA: Dr. Joe
FRC #0088 (TJ2)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1996
Location: Raynham, MA
Posts: 2,648
Joe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond repute
try this...

If p4_y > 147 Then
'lift arm up
relay6_fwd = 1
Else
If p4_y < 100 Then
'lower arm
relay6_fwd = 0
Else
'do nothing
Endif
Endif

Note that the above code is from memory and I may have the variable names a bit mixed up.

Also, I don't know how your robot is plumbed. It may be that I don't turn on the relays in the right order or direction or maybe even you use an exotic combination of valves and such that you need to do more that what I suggested to put the arm up or to lower it. But... ... you should be able to figure things out from the code example. Also, you probably need to have something initializing the position when the robot resets or is powered up just to be sure that you are in the state you want to be in when you wake up.

Good luck.

Joe J.

Last edited by Joe Johnson : 27-05-2003 at 17:18.
 


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
Fried program slots? Jeff Waegelin Programming 18 19-03-2003 18:08
robot goes haywire with the one joystick default code Miles Programming 7 24-01-2003 14:58
joystick problem archiver 2000 12 23-06-2002 23:08
speed control punarhero Technical Discussion 11 24-01-2002 18:03
switching joystick axis????? team222badbrad Technical Discussion 9 16-01-2002 23:07


All times are GMT -5. The time now is 09:11.

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