|
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.
|