// using my WS2812Bmeowmeter.. +upgrade 10meters 60/leds/meter additional WS2812B stripes //extendet my ws2812B stripe animation kote for driving 720x (x=6 * y=120) WS2812B large matrix with :3 //random color pixel fall down... fall downpixel mix storring on ground.. //is similar pixal fall on same startflickering all pixels similar in mix also flickering and gone.. //mix fall together 2same colors together flickering again and all same colors gone in whole matrix.. continiues :3 //mix fall together if stealing colors from chaos mix below= making colors more homogen 2 pixels near same again flickering.. //less colors in mix only matter of time until chain reaction and whole mixe gone with flickering //code and idea by marderchen :3 a realy complex logic stripegameanimation just use this if like it :3 hate capitalism! //720 WS2812Bpixel Matrix Powered By 5VDC 22000mA (22A but more with 9900uF 10V high frequency elektrolyte capacitors)) ATX supply,12* 1meter stripes soldeered together, 6long stripes glued on tinned steel plates soldered together 2x 120x1000mm large //leds using 2 STM32F103C8T6 (9U chip series) GPIO outputs, on supplybox 5x taster, 6x led interface, additional capacitors, playiglascase, on stripes also additional SMD capacitors //base animation done matrix working :3 upgrade with tertris block symbols falling down and rotating is time :3 tasteruse later .. #include #define screenya 480 //musste split 719led tolaarge #define screenyb 240 #define stripe 120 #define lines 6 /* a1/\ | a3/\ | b1/\ | a2\/ | a4\/ | b2\/ | stripeorder Din oben/unten balanced by code /\ =Din on bottom, dataflow to top */ //stripes a=480 >>PB8 stripes b=239 >>PB7 CRGBPalette16 currentPalette; CRGB ledsa[screenya+2]; CRGB ledsb[screenyb+2]; #define user PC13 //onboardled kote running indicator #define t1 PB12 #define t2 PB13 #define t3 PB14 #define t4 PB15 #define t5 PA8 #define Iled1 PB11 #define Iled2 PB10 #define Iled3 PB1 #define Iled4 PB0 #define Iled5 PA7 #define Iled6 PA6 void setup(){ pinMode(user,OUTPUT);pinMode(Iled1,OUTPUT);pinMode(Iled2,OUTPUT);pinMode(Iled3,OUTPUT);pinMode(Iled4,OUTPUT);pinMode(Iled5,OUTPUT);pinMode(Iled6,OUTPUT); pinMode(t1,INPUT);pinMode(t2,INPUT);pinMode(t3,INPUT);pinMode(t4,INPUT);pinMode(t5,INPUT); ledsaus(); FastLED.addLeds(ledsa, screenya); FastLED.addLeds(ledsb, screenyb); FastLED.setBrightness(255); currentPalette = RainbowColors_p; delay(100); //wait for full power } uint16_t merkd,positron,timer[11],xtomuch; uint8_t timernewpix,rander,nexter[lines+1],hellmax=255,mengec,undmich=random(0,5),multi=12; uint8_t leddata[lines+1][stripe+2][2];//(color,brighteness) uint8_t gamedata[lines+1][stripe+2][10];//0active,1falingnoned,2timer,3intervall,4color,5position,6flicker,7hell,8flickertick void loop(){zeitreise();} long maintime=millis();long littletime=millis();long slowtime=millis(); void zeitreise(void){ while ((millis()- maintime) >= 2){maintime=millis();merkd++;if(merkd>20){merkd=0;}if(merkd<10){digitalWrite(user,LOW);}else{digitalWrite(user,HIGH);} timernewpix++; for(uint16_t z0mg=0; z0mg1){leddata[z0mg][timergibt][1]-=2;}if(leddata[z0mg][timergibt][1]>0){leddata[z0mg][timergibt][1]--;}}} wuselfarben(); maintime=millis();}//indicator while ((millis()- littletime) >= 20){ for( uint16_t y = 0; y stripe && y <(2*stripe)){ledsa[(2*stripe)-(y-stripe)] = ColorFromPalette( currentPalette,leddata[3][y-stripe][0]*multi,leddata[3][y-stripe][1],BLEND);} //a2 if(y >(2*stripe) && y <=(3*stripe)){xtomuch=stripe-(y-(2*stripe)); ledsa[(3*stripe)-(y-2*stripe)] = ColorFromPalette( currentPalette,leddata[1][xtomuch][0]*multi,leddata[1][xtomuch][1],BLEND);} //a3 error if(y >(3*stripe) && y <=(4*stripe)){ledsa[(4*stripe)-(y-3*stripe)] = ColorFromPalette( currentPalette,leddata[4][y-(3*stripe)][0]*multi,leddata[4][y-(3*stripe)][1],BLEND);}} //a3 for( uint8_t ys = 0; ys stripe ){ledsb[(2*stripe)-(ys-stripe)] = ColorFromPalette( currentPalette,leddata[5][ys-stripe][0]*multi,leddata[5][ys-stripe][1],BLEND);}} //b2 error ledsa[120]=CRGB(0,0,0);ledsb[120]=CRGB(0,0,0);//pixeltest ledsa[260]=CRGB(255,200,100); FastLED.show();littletime = millis();} //apply array if would notm much 2meter long datawire have to resort them^^ } void wuselfarben(void){ //new stuff timer less=morefalldown falldown speed falldowncolor if(timernewpix>=rander){timernewpix=0; rander=random(18,32)*4; if(leddata[undmich][stripe-1][1]<10){gamedata[undmich][nexter[undmich]][0]=1;gamedata[undmich][nexter[undmich]][3]=random(1,7)*2;gamedata[undmich][nexter[undmich]][4]=random(0,20);gamedata[undmich][nexter[undmich]][5]=stripe; gamedata[undmich][nexter[undmich]][7]=hellmax;}}//setse startwert for(uint8_t linie=0;linie=gamedata[linie][gug][3]){gamedata[linie][gug][2]=0; //interfallticker if(gamedata[linie][gug][5]>0){if(leddata[linie][gamedata[linie][gug][5]-1][1]==0){gamedata[linie][gug][5]--;}}//fallrunter wen nächster schwarz } leddata[linie][gamedata[linie][gug][5]][0]=gamedata[linie][gug][4]; if(gamedata[linie][gug][7]>0){leddata[linie][gamedata[linie][gug][5]][1]=gamedata[linie][gug][7];}//überneme gamedata an position if(leddata[linie][gamedata[linie][gug][5]][0]==leddata[linie][gamedata[linie][gug][5]-1][0]){gamedata[linie][gug][6]=1;gamedata[linie][gug][3]=9;//erkenne doppelfarbe setz gleich flacker // for(uint8_t rechts=0;rechts20){for(uint8_t ww=0;ww<9;ww++){gamedata[linie][gug][ww]=0;}}//wegmach mengec++;// zähl aktive if(mengec >(stripe-20)){for(uint8_t rrR=0;rrR