![]() |
Arm Rotation (1 Button Programming!!)
ok......i have asked several questions about the turning of the arm......slowly but surely with all of your help our control team has figured out a simple program to make the arm turn with ONE BUTTON!!!! Thanx for everyone's help and please reply here or pm me if you have any questions!!! Our team will be glad to help out. Here is the code for everyone who needs it :D
if logged = 1 then hopskipjump: if count1 = 1 then skippy: if p1_sw_top = 0 then out: if p1_sw_top = 1 then in: in: relay1_fwd = 1 relay1_rev = 0 count1 = 1 goto hopskipjump: out: skippy: if count1 = 0 then jumpy: if p1_sw_top = 0 then outy: if p1_sw_top = 1 then iny: iny: relay1_rev = 1 relay1_fwd = 0 count1 = 0 outy: jumpy: hopskipjump: logged = p1_sw_top |
Re: Arm Rotation (1 Button Programming!!)
Hi Joel,
<shamelessplug> If you were using my BASIC Stamp Preprocessor (available in the wite papers section with additional information elsewhere in this Technical Discussion forum), you could rewrite your code thus to make it more understandable: Code:
{$if logged = 0} Now that I did that, and examined the code further, I'm not sure this code is going to do exactly what you want. Let me analyze what this code does: Code:
If the joystick thumb button was NOT pressed the last time we Code:
{$if prevButtonState = 0} |
| All times are GMT -5. The time now is 10:03. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi