#pragma config(Sensor, dgtl1, red, sensorLEDtoVCC) #pragma config(Sensor, dgtl2, yellow, sensorLEDtoVCC) #pragma config(Sensor, dgtl3, green, sensorLEDtoVCC) #pragma config(Sensor, dgtl4, button, sensorTouch) #pragma config(Motor, port1, motor, tmotorVex393_HBridge, openLoop) //*!!Code automatically generated by 'ROBOTC' configuration wizard !!*// task main() { while(1 == 1) { if(SensorValue(button) == 1) { turnLEDOff(red); turnLEDOff(yellow); turnLEDOn(green); startMotor(port1, 100); } else { turnLEDOn(red); turnLEDOff(yellow); turnLEDOff(green); stopMotor(port1); } } }