Use a Touch Sensor

These steps can take up to 15 minutes.

Connect a Touch Sensor

Now we will control the Large Motor using a Touch Sensor.

Keeping the Large Motor connected to Port D, connect a Touch Sensor to Port 1 of your EV3 Brick.

Modify Your Program

1. Add the Wait programming block in front of the Large Motor Block.

2. Change the properties of the block to: Touch Sensor > Compare > State.

Press the Touch Sensor

Confirm that the Large Motor has turned one rotation AFTER you press the Touch Sensor.

Download and run the program as many times you want in order to verify this.

Connect a Color Sensor

Now we will try to control the Large Motor using another sensor.

Keeping the Large Motor connected to Port D, connect the Color Sensor to Port 4.

Modify Your Program

Using the same program, change the properties of the Wait Block to Color Sensor > Compare > Color.

Make sure to select the color you want to detect (e.g., green).

Download and Run the Program

Place a Colored Brick in Front of the Color Sensor

Confirm that the Large Motor has turned one rotation AFTER the Color Sensor has detected the colored brick.

Download and run the program as many times as you want in order to verify this.

Well Done!

You have now learned how to control some of the outputs and inputs of EV3.

Click here to access the next project