//MEOW =^.^= kot vor try brightenes from CIS RGB leds (thisone lighting a acryl stick in scanner) #define blau1 PB12 #define rot1 PB13 #define grun1 PB14 #define blau2 PB15 #define rot2 PA8 #define grun2 PA9 #define blau3 PA10 #define rot3 PB5 #define grun3 PB6 #define blau4 PB7 //#define rot4 PB13 #define grun4 PB8 #define blau0603 PC13 #define grun0603 PC14 #define rot0603 PC15 #define Tfix1 PB0 #define Tmore PB11 #define T2 PB1 #define T3 PA12 #define Tfix2 PA15 uint8_t leds[6][7]; //uint8_t info[9]; //uint8_t infoist[9]; uint8_t ledmeng=4; int8_t onpress[8]; uint16_t dutywidth=240; uint8_t steps=6; void setup() { pinMode(rot1, OUTPUT); pinMode(grun1, OUTPUT); pinMode(blau1, OUTPUT); pinMode(rot2, OUTPUT); pinMode(grun2, OUTPUT); pinMode(blau2, OUTPUT); pinMode(rot3, OUTPUT); pinMode(grun3, OUTPUT); pinMode(blau3, OUTPUT); pinMode(grun4, OUTPUT); pinMode(blau4, OUTPUT); // pinMode(rot4, OUTPUT); pinMode(rot0603, OUTPUT); pinMode(grun0603, OUTPUT); pinMode(blau0603, OUTPUT); pinMode(Tmore, INPUT); pinMode(T2, INPUT); pinMode(T3, INPUT); pinMode(Tfix1, INPUT); pinMode(Tfix2, INPUT); delay(100); statiaus();noLED(); } uint16_t zeit1; uint8_t roetz,guenz,blauz; void loop() { zeitreise(); teachbeat(); } long beatleng =100000; boolean entwederoder=false; boolean startend=false; boolean bluestep=false; uint8_t ab=0; void teachbeat(void){// hihi think beast beatsyncmethode tapsing taster to beat and controller auto contiu with tapsenspeed calculater betweensteps itsels.. use idea if usefull.. but its manual beatteching also howmany steps.. but works for every musicbpm, if (digitalRead(Tfix1) ==HIGH && entwederoder==false) { if (startend==false){beatleng=0;startend=true;}startend=false; entwederoder=true;} if (digitalRead(Tfix2) ==HIGH && entwederoder==true ) {entwederoder=false;} } void coloursetz(uint8_t dieled){ // leds[dieled][2] //0=colour, 1=bright, 2red3gren4blue 5=stillbrighttime if (leds[dieled][0]==0){ leds[dieled][2]=leds[dieled][1]; leds[dieled][3]=0; leds[dieled][4]=0;} //red if (leds[dieled][0]==1){ leds[dieled][2]=round(leds[dieled][1]/2); leds[dieled][3]=0; leds[dieled][4]=round(leds[dieled][1]/3);} //pink if (leds[dieled][0]==2){ leds[dieled][2]=round(leds[dieled][1]/2); leds[dieled][3]=0; leds[dieled][4]=round(leds[dieled][1]/2);} //mangenta if (leds[dieled][0]==3){ leds[dieled][2]=round(leds[dieled][1]/3); leds[dieled][3]=0; leds[dieled][4]=round(leds[dieled][1]/2);} //purple if (leds[dieled][0]==4){ leds[dieled][2]=0; leds[dieled][3]=0; leds[dieled][4]=leds[dieled][1];} //blue if (leds[dieled][0]==5){ leds[dieled][2]=0; leds[dieled][3]=round(leds[dieled][1]/4); leds[dieled][4]=round(leds[dieled][1]/2);} //cyanblue if (leds[dieled][0]==6){ leds[dieled][2]=0; leds[dieled][3]=leds[dieled][1]; leds[dieled][4]=leds[dieled][1];} //cyan if (leds[dieled][0]==7){ leds[dieled][2]=0; leds[dieled][3]=leds[dieled][1]; leds[dieled][4]=0;} //green if (leds[dieled][0]==8){ leds[dieled][2]=round(leds[dieled][1]/3); leds[dieled][3]=round(leds[dieled][1]/2); leds[dieled][4]=0;} //yellow if (leds[dieled][0]==9){ leds[dieled][2]=round(leds[dieled][1]/2); leds[dieled][3]=round(leds[dieled][1]/3); leds[dieled][4]=0;} //orange }//kittens kant kount.. whatever fuzzelfurrmind.. just mostly not absolutlyworking if furrfurrheadwridedown :3 void istinput(void){ if (zeit1 >=2) { if (digitalRead(Tmore) == HIGH && onpress[2] ==0 && steps <15) { onpress[2] =1; steps++;} if (onpress[2] == 1) { onpress[3]++;} if (onpress[3] >= 20) { onpress[3] =0; onpress[2]=0; } if (digitalRead(T2) == HIGH && onpress[4] ==0) { onpress[4] =1; } if (onpress[4] == 1) { onpress[5]++;} if (onpress[5] >= 10) { onpress[5] =0; onpress[4]=0; } if (digitalRead(T3) == HIGH && onpress[6] ==0 && steps >0) { onpress[6] =1; steps--; } if (onpress[6] == 1) { onpress[7]++;} if (onpress[7] >= 20) { onpress[7] =0; onpress[6]=0;} zeit1=0;} } long maintime=millis(); long maintime2=micros(); long maintime3=micros();long beaty=micros(); long timez=micros(); long flash=micros(); uint32_t beatcach=0; uint32_t beatcach2=0; uint8_t vielleicht=0; void zeitreise(void){ while ((millis()- maintime) >= 5){zeit1++; istinput();maintime = millis(); pulsblau(); bluestep=false; } //fader(); while ((micros()- beaty) >= 100) {beaty=micros(); if(entwederoder ==true) {beatleng++;} if (beatcach >beatleng) {beatcach=0; ab++; if (ab >1){ab=0;vielleicht=random(0,20); /*sync();*/} showpulse(ab); }beatcach++;beatcach2++; if(beatcach2 >round((beatleng*2)/steps)) {beatcach2=0; blitzy(); } } while ((micros()- timez) >= 300) {negativation();timez = micros();} while ((micros()-flash) >= 10) { schaltzeugs(); flash = micros();} } uint8_t zahly,zahlyzahl,picone,colrand2; void pulsblau(void){ if (bluestep==true) {blauz=dutywidth;} if (bluestep==false&& blauz>4) {blauz-=4;} } uint8_t timerand=0; void blitzy(void){ zahly=random(1,5); zahlyzahl=random(0,9); colrand2=random(0,11); timerand=random(0,10); for (uint8_t ka=0; ka 9){leds[picone][0]=random(0,9);} leds[picone][6]=dutywidth-timerand; leds[picone][5]=5+timerand; }} for (uint8_t variable=0; variable0){roetz--;} } void negativation(void){ for (int8_t eins=0; eins 1){ leds[eins][1]=dutywidth; leds[eins][5]--;} if (leds[eins][5]==1){ leds[eins][1]=leds[eins][6]; leds[eins][5]--;}//leds[eins][0]=random(0,9); if (leds[eins][1]>0 && leds[eins][5] ==0){leds[eins][1]--; if (vielleicht <2) {leds[eins][0]=random(0,9); }} } for (uint8_t variabled=0; variabled0) {info[vier]--;} }} void sync(void){ for (uint8_t fuenf=0;fuenf <=6; fuenf++) { info[fuenf]=infoist[fuenf]; }} void applysteps(void){ for (uint8_t zwei=0;zwei <=6; zwei++) { if (zwei round(steps/2)) {infoist[zwei]=0;} }} void noLEDs(void){digitalWrite(LED1,HIGH);digitalWrite(LED2,HIGH); digitalWrite(LED3,HIGH); digitalWrite(LED4,HIGH); digitalWrite(LED5,HIGH); digitalWrite(LED6,HIGH); } */ void schaltzeugs(void) { // applysteps(); guenz=steps*15; noLED(); for (int16_t laag=0; laag <=dutywidth; laag++) { if (laag == 0) {noLED(); statiaus();} if (laag <= (dutywidth-1) && laag >=1) { if (laag == (dutywidth-leds[0][2])) { digitalWrite(rot1, LOW);} if (laag == (dutywidth-leds[0][3])) { digitalWrite(grun1, LOW);} if (laag == (dutywidth-leds[0][4])) { digitalWrite(blau1, LOW);} if (laag == (dutywidth-leds[1][2])) { digitalWrite(rot2, LOW);} if (laag == (dutywidth-leds[1][3])) { digitalWrite(grun2, LOW);} if (laag == (dutywidth-leds[1][4])) { digitalWrite(blau2, LOW);} if (laag == (dutywidth-leds[2][2])) { digitalWrite(rot3, LOW);} if (laag == (dutywidth-leds[2][3])) { digitalWrite(grun3, LOW);} if (laag == (dutywidth-leds[2][4])) { digitalWrite(blau3, LOW);} // if (laag == (dutywidth-leds[3][2])) { digitalWrite(rot4, HIGH);} if (laag == (dutywidth-leds[3][3])) { digitalWrite(grun4, LOW);} if (laag == (dutywidth-leds[3][4])) { digitalWrite(blau4, LOW);} if (laag == (dutywidth-roetz)) { digitalWrite(rot0603, LOW);} if (laag == (dutywidth-guenz)) { digitalWrite(grun0603, LOW);} if (laag == (dutywidth-blauz)) { digitalWrite(blau0603, LOW);} /* if (laag == (dutywidth0-info[0])) { digitalWrite(LED1, LOW);} if (laag == (dutywidth-info[1])) { digitalWrite(LED2, LOW);} if (laag == (6dutywidth-info[2])) { digitalWrite(LED3, LOW);} if (laag == (dutywidth-info[3])) { digitalWrite(LED4, LOW);} if (laag == (dutywidth-info[4])) { digitalWrite(LED5, LOW);} if (laag == (dutywidth-info[5])) { digitalWrite(LED6, LOW);}*/} if (laag >=dutywidth) {statiaus(); noLED();}//noLEDs();} } } void noLED(void) {digitalWrite(rot1,HIGH); digitalWrite(grun1,HIGH); digitalWrite(blau1,HIGH); digitalWrite(rot2,HIGH); digitalWrite(grun2,HIGH); digitalWrite(blau2,LOW); digitalWrite(rot3,HIGH); digitalWrite(grun3,HIGH); digitalWrite(blau3,HIGH); digitalWrite(grun4,HIGH); digitalWrite(blau4,HIGH); }//digitalWrite(rot4,LOW); void statiaus(void) {digitalWrite(rot0603,HIGH); digitalWrite(grun0603,HIGH); digitalWrite(blau0603,HIGH);} // // [MEOW] more rainbowpower! this RGB matrix is near maximum from cheap singlechip brightpowder with used ~1Watt/chip(color) only brightest chip aviable from awesome cute producer4 Luminus are brighter (purrr brightest signlechip led producer worldwide just to expensive for a marten)