hello_led
Dies ist eine alte Version des Dokuments!
Inhaltsverzeichnis
Hello LED
Quellcode (engl. Sourcecode)
Listing 1:MinimalesProgramm.ino
int LED_RED = 4; // variable (hier für eine rote LED auf PIN 4 festlegen) void setup() { pinMode(LED_RED, OUTPUT); } void loop() { digitalWrite(LED_RED, HIGH); // switch on PIN delay(500); // wait 0.5 seconds digitalWrite(LED_RED, LOW); // switch off PIN delay(500); // wait 0.5 seconds }
Beachte
- Jede Zeile besitzt am Ende ein SEMIKOLON!
- Dies gilt nicht für Kontrollstrukturen und Funktionen (aber davon später)
- Groß/Kleinschreibung ist wichtig!
Fragen
hello_led.1716545002.txt.gz · Zuletzt geändert: 2024/05/24 10:03 von torsten.roehl