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; wait1Msec(500);
//turn right
motor[motorB] = 100; wait1Msec(2000);
     while(SensorValue(lightSensor) <50) //loop while the light sensor is less then 50     {         motor[motorB] = -100;         motor[motorC] = -100;     }
//open claw
motor[motorA] = -75; wait1Msec(500);
}
all the robot does is sit there!
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.