Hey guys, been looking around for a toggle program and found one that I didn’t think was easy for the average programmer to glance at and understand, so I attempted to make an easier to understand version that does the same thing. This code is for using two buttons to control one toggle, one to open, one to close. (If you want to have one button change Btn6U to Btn6D or vice-versa)
void toggle()
{
if(vexRT[Btn6U] == 1 & counter < 1 )
{
counter = counter + 1;
}
if(vexRT[Btn6D] == 1 & counter == 1)
{
counter = counter - 1;
}
}
You can then use the counter value as a toggle.
-944_Nick (Still need to activate my account)