We tried using someone else’s program but couldn’t get it to work. I am using Easy C and we put the program in ours and still can’t get the pneumatics to work. We also have 5 other motors in the while loop, but if I put another while loop in there nothing works but if I have everything in the one while loop the other 5 motors work but the pneumatics don’t.
Post the program but in general your going to want only 1 while loop with everything inside.
1st post the program
2nd its a digital out
3th use if statments
4th the code is
task main()
{
while(true) // Loop Forever
{
if(vexRT[Btn6U] == 1) //if button is pressed
{
SensorValue[solenoid] = 1; // …activate the solenoid.
}
else. // if button is not pressed
{
SensorValue[solenoid] = 0; // …deactivate the solenoid.
}
}
}
I found it on http://www.robotc.net
Did you also make the motor/sensor setup have a digital output?