change-colors
(C)stachan 08.02.2024
Task :: Change Colors
Schreiben Sie ein Programm, bei dem die grüne LED in 1T=60000 in einer Endlosschleife blinkt.
In jeder Runde soll ein Punkt im Debugger ausgegeben werden.
- Wird der rote Button gedrückt, wechselt die Farbe der blinkenden LED, d.h. die gelbe LED übernimmt.
- Wird der rote Button erneut gedrückt, wechselt das Blinklicht zur roten LED.
- Ein weiterer Klick auf den roten Button wechselt wieder zurück zu grün.
Bei jedem Farbwechsel wird im Debugger der Text “Farben wechseln” ausgegeben.
Write a program where the green LED flashes in 1T=60000 in an endless loop.
In each loop a dot should be output in the debugger.
- If the red button is pressed, the colour of the flashing LED changes, i.e., the yellow LED takes over.
- If the red button is pressed again, the flashing light changes to the red LED.
- Another click on the red button changes back to green.
With every colour change the debugger displays the text “change colors”.