Instructions

The program
Every time the car reaches the upper stage edge, a new route image will appear and the car will start at the lower stage edge again.
The car is controlled via two script blocks. The first block is made up of two nested endless loops. The outer loop places the car at the lower
stage edge, waits until it has reached the top and then sends a message background, to which the background reacts and changes.
The inner loop moves the car while the edge is not touched, and checks whether a black wheel of the car touches the light-green meadow to the
left of the street at every movement. If so, the left red LED lights up and the green one is switched off. If the meadow is not touched, another
query will check whether the dark green meadow to the right of the street is touched. In this case, the right red LED is switched on and the
green one off as well. If this is not the case either, the car is still on the road and the green LED remains on.
The stage has two more simple scripts. At the beginning, when clicking the green vane, the first background image is activated; every time the
message background is received, the next background image is shown.
18. Day
Effect lights
GPIO-pins can also control more than one LED; however, each LED should still have its own dropping resistor. The experiment of the 18th day
shows a light effect on six LEDs that only need three GPIO-pins, however.
Components: 1 x plug board, 2 x LED red, 2 x LED yellow, 1 x LED green,1 x LED blue, 6 x 220-Ohm resistor, 3 x wire bridge, 4 x connection
cables
The program
The GPIO-pins are switched on in sequence in an endless loop. In contrast to the running light, they remain on and will only be switched off
together at the end. The time between the switching processes is saved in the variable
z
that can be set interactively via a controller on the
screen.
The program
18lichteffekt
controls the light effect at the three GPIO
pins.
19. Day
Tennis game
The experiment of the 19th day is a gaming classic of the early home computer era. Two players try to beat a ball across the playing field. When
the opponent's base line is hit, a point is awarded. The program is based on the pong game from a few days ago.