Lego® EV3 color sensor with Scratch

EV3 color sensor isn't fully supported in the current EV3 extension in Scratch. Only the brightness value is reported, that's why I call it a light sensor.

Light reflected from white gives more value than from another color. I used this property in the first example.

Second example is an alarm that wakes us up when the sun rises.

The third example is a classic one - line follower.

Lego® EV3 touch sensor with Scratch

Lego® EV3 touch sensor is supported by Scratch as a button. The button number is the port number to which the sensor is connected. We can use four sensors by connecting them into the different ports.

Below there are three examples of using touch sensor:

- the hat block "When 1 button pressed"
- "button 1 pressed" with "if"
- "button 1 pressed" with "wait until"

Programming Lego EV3 with Scratch

In order to use Lego Mindstorms EV3 with Scratch you must install and run Scratch Link, turn on bluetooth in your computer and in EV3 Brick and load EV3 extension in Scrach.

Using Lego EV3 with scratch is quite limited, but sufficient to do simple exercises. We can use touch sensor, ultrasonic sensor and motor position. In color sensor we can only use brightness. We can't move the motor by an angle. Only per seconds.

In this video I've tried to show how to install the required stuff and how to use to motor and sensors.