(C)stachan 07.04.2025

Task :: Binary Counter

Schreiben Sie ein Programm, das endlos von 0 bis 7 zählt (1T = 50000), jede Zahl soll im Debugger ausgegeben und gleichzeitig mittels LEDs binär angezeigt werden, z.B. 5 = 101 = grün an, gelb aus, rot an. Benutzen Sie Schleifen als if/else.

Binary green yellow red
000 off off off
001 off off on
010 off on off
011 off on on
100 on off off
101 on off on
110 on on off
111 on on on

Wird der rote Button geklickt, erscheint der Text BINARY COUNTER, der Zähler wird dadurch nicht gestoppt.


Task :: Binary Counter

Write a programme that counts endlessly from 0 to 7 (1T = 50000), each number should be output in the debugger and simultaneously displayed in binary form using LEDs, e.g. 5 = 101 = green on, yellow off, red on. Use loops as if/else.

Binary green yellow red
000 off off off
001 off off on
010 off on off
011 off on on
100 on off off
101 on off on
110 on on off
111 on on on

If the red button is clicked, the text BINARY COUNTER appears, the counter is not stopped.