Skip to content

Instantly share code, notes, and snippets.

@IanWold
Last active January 3, 2016 15:59
Show Gist options
  • Save IanWold/8486028 to your computer and use it in GitHub Desktop.
Save IanWold/8486028 to your computer and use it in GitHub Desktop.
if (joy2_Btn(1) == 1) //If you need to use the second joystick, change it to: Joy2_Btn(1)
{
if (motor[m4] == 0) //If you need to use a different motor, change every "m4" to whichever motor you need
{
motor[m4] = 100; //If you need the motor to go at a different speed, change the "100" here to the speed you need.
//This number is a percentage - 100 is 100% speed, 50 is 50% speed, etc.
}
else
{
motor[m4] = 0;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment