Instructions

This Scratch program
02blink
makes the LEDs flash alternatingly
The program starts when the user clicks the green vane at the upper right of the Scratch window.
A repeated continuous-loop ensures that the LEDs flash endlessly until the user clicks the red stop icon on the upper right in Scratch.
The GPIO commands are output via the Scratch block send...to all. In the text field, a connect-block from the green block pallet operators is
used to connect the respective pin designation and the key word on or off into a message.
After the red LED at pin 12 has been switched on, and the yellow LED at pin 18 has been switched off, the program will wait for half a second.
(Note: Like many other US programs, Scratch uses the period as decimal indicator instead of the comma, as it is customary in Germany.)
Then the red LED at pin 12 is switched off in the same manner, and the yellow LED at pin 18 is switched off.
3. Day
Traffic light
The experiment of the 3rd day switches a traffic light of three LEDs in a typical cycle of red to red and yellow to green and back to yellow and
red.
Components: 1 x plug board, 1 x LED red, 1 x LED yellow, 1 x LED green, 3 x 220-Ohm resistor, 4 x connection cables
The program
The programme works similarly as yesterday's. Again, different combinations of LEDs are switched on and off in an endless loop. In the interim
phases red-yellow and yellow, the traffic light will be lit for 0.5 seconds each; in the phases red and green, it will be lit for 2 seconds each.
These times can also be set differently in the wait for...sec-blocks.










