Instructions

The program
The program is based on an earlier program where the RGB values were saved in variables and written into the variables associated with the
GPIO pins via set...to-blocks.
The program
16rgb2sensor
makes an RGB-LED flash.
A second script block that is also started when clicking the
green vane will query the three
putty sensors and set the
variables
r
,
g
and
b
accordingly.
The second script block queries the sensors.
17. Day
Car race
Two buttons are used to control a car in a simple race. While the car is on the road, the green LED on the gaming controller is lit; if the car veers
off to the left or right, one of the two red ones is lit.
Components: 1 x plug board, 2 x LED red, 1 x LED green,
2 x 220-Ohm resistor, 2 x button, 2 x wire bridge (con-
nection wire), 6 x connection cables