RobotC Help

Hi, I am using robotc,
I made a program and could somebody tell me why it is not working?
const tSensors touchSensor = (tSensors) S1;
const tSensors soundSensor = (tSensors) S3;
const tSensors lightSensor = (tSensors) S2;
task main()
while(SensorValue(touchSensor) == 0) //loop while the touch sensor is
not pressed
motor[motorB] = 100;
motor[motorC] = 100;
} //exit loop when touch sensor is pressed
while(SensorValue(soundSensor) >20) //loop while the sound sensor
is not activated
motor[motorB] = 0;
motor[motorC] = 0;
motor[motorA] = 0;
//close claw
motor[motorA] = 75;
//turn right
motor[motorB] = 100;
Reply to
Loading thread data ...

Site Timeline

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.