I have a problem trying to cause the piston going forwards and backwards.
What I`ve tried to do is to move the piston backwards when the user clicks on the joystick`s trig and to move the piston forwards when the user get rid of the joystick`s trig.
I had a problem which seemed ambiguous for me and I couldn`t find the error, it compiled successfully.
I made sure the spike is plugged in the proper relay, and the joystick is plugged in the proper port.
Here is the code:
if(p1_sw_trig)
{
relay1_fwd = 0;
relay1_rev = 1;
}
else
{
relay1_fwd = 1;
relay1_rev = 0;
}
but it doesn`t do anything

.