initial commit [141.14.129.234,mike]

This commit is contained in:
mike committed 2026-10-13 19:55:01 +02:00
commit 80dedb840f
22 files changed
+1723

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
// Blink-Test für den Seeed Studio XIAO ESP32-C3.
// Das Board hat keine eigene User-LED: externe LED mit ~220 Ω Vorwiderstand an D10 gegen GND.
// Jeder Takt wird zusätzlich über USB-Serial ausgegeben, dazu der Zustand der BOOT-Taste.
const int LED_PIN = D10;
const int BOOT_BUTTON_PIN = 9; // BOOT-Taste auf der Platine, gedrückt = LOW
const unsigned long BLINK_INTERVAL_MS = 500;
void setup() {
Serial.begin(115200);
pinMode(LED_PIN, OUTPUT);
pinMode(BOOT_BUTTON_PIN, INPUT_PULLUP);
}
void loop() {
static bool ledOn = false;
static unsigned long count = 0;
ledOn = !ledOn;
digitalWrite(LED_PIN, ledOn ? HIGH : LOW);
bool buttonPressed = digitalRead(BOOT_BUTTON_PIN) == LOW;
Serial.printf("#%lu LED %s | BOOT-Taste %s\n", ++count, ledOn ? "an " : "aus",
buttonPressed ? "gedrückt" : "-");
delay(BLINK_INTERVAL_MS);
}