try this (modify as needed)
Code:
while (IsOperatorControl)
if (LeftStick.GetRawButton(1) == true)
{
roller.Set(1.0);
}
if (LeftStick.GetRawButton(1) == false)
{
roller.Set(0.0);
}
Wait(0.005);
LeftStick is your left joystick variable
Roller is the function to be used with the trigger
No need for semaphores, and don't worry, the cRIO is so fast, you'd never notice the lag.
This is part of 558's codebase. If you need more help email me:
pplude@freehugalliance.com