#include #define LED_PIN PB8 //DIN connect to pin B8 #define BRIGHTNESS 255 #define LED_TYPE WS2812 #define COLOR_ORDER GRB #define screeny 10 //number of leds CRGB leds[screeny]; CRGBPalette16 currentPalette; TBlendType currentBlending; #define UPDATES_PER_SECOND 5000 extern CRGBPalette16 myRedWhiteBluePalette; long maintime = millis(); int zeit1=0; void setup(){ delay(200); FastLED.addLeds(leds, screeny).setCorrection( TypicalLEDStrip ); FastLED.setBrightness( BRIGHTNESS ); currentPalette = RainbowColors_p; currentBlending = BLEND; } void loop(){ regenbogen(); zeitreise(); } int color2=0; int color=0; int speedz=0; void regenbogen(void){ color2+=speedz/10; // movingng one color other leds calculating with this color =color2; for( int i = screeny; i > 0; i--) { color+=speedz*1.5; //space between new colors if (speedz > 50) { speedz = random(2,20);} leds[i] = ColorFromPalette( currentPalette,255-color, BRIGHTNESS, currentBlending); leds[screeny-i] = ColorFromPalette( currentPalette,255-color, BRIGHTNESS, currentBlending); } FastLED.show(); FastLED.delay(1000 / 2000); //updatespeed } void zeitreise(void){ while ((millis()- maintime) >= 10) { zeit1++; if(zeit1 > 30) { speedz++;zeit1 =0;} maintime = millis(); } } //WS2812B testprog //MEOW! its free use it or parts if there is somethink usefull for you //code by marderchen =^.^=