(Lego Mindstorm robot) the big engine with the color sensor

Materials

1- Tablet with Mindstorm app

2- Color sensor

3- The big engine

Step  1 : Connecting

Connect the big engine  with the port D and connect the color sensor with the port 4

Step  2 : Challenges

Make the engine spin 4 turns with a red sensor
Make the engine work for 4 seconds with the green sensor

Color Sensor ___ Compare ____Color ___RED