500
This line of code uses the sonar called sonar1 and the motor called leftmoto to spin the motor one way when a hand is greater than 10 cm away and spin the other direction when it is less than or equal to 10 cm away. You have 2 minutes.
if(SensorValue(sonar1)>10)
motor(leftmoto) = 100;
else
motor(leftmoto) = -100;