Instructions

The program
10blinklicht
controls a flashing light with a putty sensor
When starting the program by clicking the green vane, the variable
z
, which controls the flashing speed, is set to
0.1
. An endless loop queries the
sensor at the GPIO-pin 24. When this is touched, the LED will be lit for the time specified in variable
z
and will then be switched off again for the
same period.
If the putty sensor is touched for longer than this, a flashing effect will appear. At the end of the loop, the LED will always be off. This way, it
will stay off when the putty sensor is no longer touched.
11. Day
Pedestrian traffic light with flashing light
In some countries, the traffic lights at pedestrian crossings are not red and green, but a light flashes when the traffic light for cars shows red so
that one can cross the street.
Components: 1 x plug board, 1 x LED red, 1 x LED yellow, 1 x LED green,1 x LED blue, 4 x 220-Ohm resistor, 1 x button, 1 x wire bridge, 6 x
connection cables
The program
The program runs the traffic light cycle in an endless loop. After the traffic light shows green, the loop will wait for a button to be pushed. Then
the traffic light cycle will continue until the traffic light shows red again. Then the blue LED will flash 20 times. There is no waiting time after
this LED switches off. The LED is only off for a moment, while the script starts the next run of the loop. This way, a flickering light results, in
contrast to the even flashing light of earlier programs.










