FIRST VERSION
The activity consists of drawing a circuit with black tape, create a traffic light with a mCore shield and thanks to the colour sensor, when the robot detects the red light it will stop, with the yellow light it will considerably decrease its speed and when it detects the green light will continue the speed or will be launched.
When Ranger detects the red colour it stops:
And if the colour is yellow its speed is lower and if the colour is green the mBot Ranger will be continue: