Hi, I’m working on making a marble sorting machine in my Sophomore engineering class that uses a light sensor to differentiate between three different marbles, but there’s a problem; I can get the marbles to be detected and can get my servo motor to spin to a certain position depending on the type of marble, but I can’t get the Servo to REMAIN in that position, so I need to know, what command(s) would I have to use to make it stay in that position whilst the marble is pushed and rolled into it?
Here is my code:
turnFlashlightOn (flashlight, 127)
if (SensorValue (lightSensor) < 250 )
if (SensorValue (lightSensor) > 700)
if (SensorValue (lightSensor) > 250)
Any help would be appreciated, thanks in advance!