So my code for a bumperswitch on robotc is not working I have tried using competition template, but I do not want to use that because I have no user control period. My code does absolutely nothing whether I am using the competition template or not. What am I doing wrong?
#pragma config(Sensor, dgtl12, bumperswitch, sensorTouch)
#pragma config(Motor, port1, armmotor, tmotorVex393_HBridge, openLoop)
#pragma config(Motor, port2, jawmotor, tmotorVex393_MC29, openLoop)
//*!!Code automatically generated by 'ROBOTC' configuration wizard !!*//
task main()
{
if(SensorValue[dgtl12] == 0){
motor[port1] = 40; // motor is set to run at a power of 40
motor[port10] = 20; // motor is set to run at a power of 20
}
else
{
motor[port1] = 0;
motor[port10] = 0;
}
}