// Strommessung: feste Lasten nacheinander je 10 s, danach von vorn. // Aufspielen mit: make strom (Pin/LED-Typ wie in ../config.h) // Dann über ein USB-C-Messgerät am Netzteil betreiben und je Schritt ablesen. // Ohne WLAN und ohne FastLED-Strombegrenzung. Größte Last ist "weiss 48", // laut FastLED-Modell rund 1,2 A. #include #define DATA_PIN 10 #define NUM_LEDS 125 #define STEP_MS 10000 CRGB leds[NUM_LEDS]; struct Step { const char *name; CRGB color; }; const Step STEPS[] = { {"aus", CRGB(0, 0, 0)}, {"weiss 8", CRGB(8, 8, 8)}, {"weiss 16", CRGB(16, 16, 16)}, {"weiss 32", CRGB(32, 32, 32)}, {"weiss 48", CRGB(48, 48, 48)}, {"rot 64", CRGB(64, 0, 0)}, {"gruen 64", CRGB(0, 64, 0)}, {"blau 64", CRGB(0, 0, 64)}, }; void setup() { Serial.begin(115200); Serial.setTxTimeoutMs(0); // nicht blockieren, wenn am USB niemand mitliest FastLED.addLeds(leds, NUM_LEDS); #ifdef RGB_BUILTIN rgbLedWrite(RGB_BUILTIN, 0, 0, 0); // RGB-LED auf dem Board aus #endif } void loop() { for (const Step &s : STEPS) { Serial.println(s.name); fill_solid(leds, NUM_LEDS, s.color); FastLED.show(); delay(STEP_MS); } }