Instructions

The alligator clamp cable is connected to the lower wire bridge. The ground contact at the upper wire bridge is only necessary if earthing is insufficient.
The program
The program is similar to yesterday's. When the sensor at the GPIO-pin 22 supplies the value 0, i.e. is connected to the ground, the green LED
connected to the GPIO-pin 18 is switched on and the red LED connected to the GPIO-pin 12 off. Otherwise, the red LED is switched on and the
green one off.
8. Day
Controlling the RGB LED via sensor contact
Three sensor contacts can control the three colours of an RGB-LED independently of each other. Touching two contacts at the same time will
lead to a mixed colour. Touching all three contacts causes the RGB-LED to be lit white.
Components: 1 x plug board, 1 x RGB LED, 3 x 220-Ohm resistor, 3 x 20 MOhm resistor, 4 x wire bridges (sensor contact), 1 x wire bridge
(connection wire), 8 x connection cables
The program
The program will continually query the three sensor contacts at the GPIO-pins 11, 12 and 13 in an endless loop. If a sensor supplies value 0, the
corresponding colour component of the RGB-LED is switched on; otherwise, it is off.
9. Day
Pong-game with two sensor contacts
Of course, Scratch can be used for more than programming LEDs. Originally, this programming language was meant to build simple games
onscreen. Today's program controls a simple pong game in the retro design with two metal objects that are connected to wire bridges on the
plug board via alligator clamp cables.