#include #ifdef __AVR__ #include #endif #define PIN 13 //Grundeinstellung (Anzahl der LEDs, usw.) Adafruit_NeoPixel strip = Adafruit_NeoPixel(40, PIN, NEO_GRB + NEO_KHZ800); void setup() { strip.begin(); strip.show(); // Alle LEDs initialisieren } void loop() { // Beispielhafte Farbabläufe: farbDurchlauf(strip.Color(255, 0, 0), 50); // Rot farbDurchlauf(strip.Color(0, 255, 0), 50); // Grün farbDurchlauf(strip.Color(0, 0, 255), 50); // Blau // Theater-Beleuchtung: theaterBeleuchtung(strip.Color(127, 127, 127), 50); // Weiß theaterBeleuchtung(strip.Color(127, 0, 0), 50); // Rot theaterBeleuchtung(strip.Color(0, 0, 127), 50); // Blau regenbogen(20); regenbogenVerlauf(20); theaterRegenbogen(50); } // LEDs nacheinander mit angegebener Farbe auffüllen void farbDurchlauf(uint32_t c, uint8_t wait) { for(uint16_t i=0; i