|
Re: Programming motors with joystick buttons
Same sort of thing would work if you have the window motor on a spike.
Code:
if (p1_sw_trig==1)
{
relay2_fwd = 1;
relay2_rev = 0;
}
else if (p1_sw_top==1)
{
relay2_fwd = 0;
relay2_rev = 1;
}
else
{
relay2_fwd = 0;
relay2_rev = 0;
}
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
|