(C)stachan 08.02.2024

Task :: Green & Yellow

Schreiben Sie ein Programm, bei dem die rote LED endlos durchgehend leuchtet.

Der rote Button verursacht bei Klick zwei unterschiedliche Effekte: einmal wird die grüne LED ein- und ausgeschaltet (Leuchtdauer ca 1 Sekunde), bei jedem zweiten Mal die gelbe LED.

Bei Gelb steht im Debugger der Text YELLOW, bei Grün GREEN.

Das Leuchten der roten LED soll bei Klick auf den Button unterbrochen werden, solange eine andere LED leuchtet. Verwenden Sie HIGH und LOW statt TOGGLE.

green-yellow


Write a program in which the red LED lights up continuously.

The red button causes two different effects when clicked: once the green LED is switched on and off (light duration approx. 1 second), every second time the yellow LED is switched on.

The debugger displays the text YELLOW for yellow and GREEN for green.

The lighting of the red LED should be interrupted when the button is clicked as long as another LED is lit. Use HIGH and LOW instead of TOGGLE.

green-yellow