Skip to content

Instantly share code, notes, and snippets.

@IanWold
Created April 24, 2014 22:05
Show Gist options
  • Save IanWold/11271100 to your computer and use it in GitHub Desktop.
Save IanWold/11271100 to your computer and use it in GitHub Desktop.
#pragma config(Hubs, S1, HTMotor, none, none, none)
#pragma config(Sensor, S1, , sensorI2CMuxController)
#pragma config(Motor, mtr_S1_C1_1, m1, tmotorTetrix, openLoop)
#pragma config(Motor, mtr_S1_C1_2, m2, tmotorTetrix, openLoop)
//*!!Code automatically generated by 'ROBOTC' configuration wizard !!*//
#include "JoystickDriver.c";
task main() {
while (true) {
if (joy1Btn(5) == 1)
{
motor[m1] = 100;
}
else
{
motor[m1] = 0;
}
if (joy1Btn(6) == 1)
{
motor[m2] = -100;
}
else
{
motor[m2] = 0;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment