//24channel (8x 10Watt RGB (9chipfloodlight)) #define strobe1 PC13 #define strobe2 PC14 #define strobe3 PC15 #define strobe4 PB9 #define strobe5 PB8 #define strobe6 PB7 #define strobe7 PA3 #define strobe8 PA4 #define strobe9 PA5 #define strobe10 PA6 #define strobe11 PA7 #define strobe12 PB0 #define strobe13 PB1 #define strobe14 PB10 #define strobe15 PB11 #define strobe16 PB12 #define strobe17 PB13 #define strobe18 PB14 #define strobe19 PB15 #define strobe20 PA8 #define strobe21 PA9 #define strobe22 PA10 #define strobe23 PB5 #define strobe24 PB6 #define channelz 24 #define sqsteps 24 #define fan PA2 #define temp PA0 #define nix1 PA1 #define t1 PA12 #define t2 PA15 void setup(){ delay(10); pinMode(strobe1,OUTPUT); pinMode(strobe2,OUTPUT); pinMode(strobe3,OUTPUT); pinMode(strobe4,OUTPUT); pinMode(strobe5,OUTPUT); pinMode(strobe6,OUTPUT); pinMode(strobe7,OUTPUT); pinMode(strobe8,OUTPUT); pinMode(strobe9,OUTPUT); pinMode(strobe10,OUTPUT); pinMode(strobe11,OUTPUT); pinMode(strobe12,OUTPUT); pinMode(strobe13,OUTPUT); pinMode(strobe14,OUTPUT); pinMode(strobe14,OUTPUT); pinMode(strobe15,OUTPUT); pinMode(strobe16,OUTPUT); pinMode(strobe17,OUTPUT); pinMode(strobe18,OUTPUT); pinMode(strobe19,OUTPUT); pinMode(strobe20,OUTPUT); pinMode(strobe21,OUTPUT); pinMode(strobe22,OUTPUT); pinMode(strobe23,OUTPUT); pinMode(strobe24,OUTPUT); pinMode(fan,OUTPUT);pinMode(nix1,OUTPUT);pinMode(t1,INPUT);pinMode(t2,INPUT); allof();delay(300);ratemal();} uint16_t beatsplit,strop[channelz+1],helligkeiten[channelz+1],newtrigger,blinkdata[sqsteps+1][channelz+1],isoncount,isoncount2,picker,modi=3,doubleup=1,zufall,brighty,speedy,speedymem; uint16_t moden[20]={1,2,4,6},mehrspeed[]={3,4,4,4,5,5,5};//2,3,4,5, uint16_t xmoden[7]={0,72,61,0,45,0,90};//long thing matching vauels to psy fullon {0,81,72,0,59} //most time spendet for adjusting.. //(20100/doubleup)){//something between 19500-20500 raw- beatsplit++;if (beatsplit >=xmoden[doubleup]){beatsplit=1;newtrigger++;if(newtrigger>22){ratemal();newtrigger=random(1,3)*3;}}//ratemal(); for(uint8_t fiz=0;fiz= (220/(doubleup)*6)){for(uint8_t fap=0;fap=flicker){strop[fu]-=flicker;}if(strop[fu]>=1){strop[fu]-=1;}}}dimmer = micros();}//downfade while ((micros()- littletime) >= 13){istinput();pulspowder();pulspowder();littletime = micros();} } void ratemal(void){ zufall=random(0,100); for(uint8_t rt=0;rt<9;rt++){randset[rt]=random(0,120);} if(modi==3 && zufall <10){doubleup=moden[0];} if(modi==3 && zufall >=10&& zufall <40){doubleup=moden[1];} if(modi==3 && zufall >=40&& zufall <70){doubleup=moden[2];} if(modi==3 && zufall >=70){doubleup=moden[3];}//doubleup=moden[3]; for(uint8_t tik=0;tik=40){ if(randset[2]<50){if(wisch%2==0){picker=random(0,channelz);blinkdata[wisch][picker]=helligkeiten[picker];}} if(randset[3]<40){if(wisch%2==0){picker=random(0,channelz);blinkdata[wisch][picker]=helligkeiten[picker];}} if(randset[4]<60){if(wisch%4==0){picker=random(0,channelz);blinkdata[wisch][picker]=helligkeiten[picker];}} if(randset[5]<40){if(wisch%4==0){picker=random(0,channelz);blinkdata[wisch][picker]=helligkeiten[picker];}} if(randset[6]<50){if(wisch%6==0){picker=random(0,channelz);blinkdata[wisch][picker]=helligkeiten[picker];}} if(randset[7]<60){if(wisch%8==0){picker=random(0,channelz);blinkdata[wisch][picker]=helligkeiten[picker];}} flicker=random(1,4)*3;} }waserraten();} void waserraten(void){ isoncount=0;ison2=0; for(uint8_t tak=0;tak=1){isoncount++;}}if(isoncount>1){ison2++;}}if(ison2<=8){ratemal();}}//try solong until minimum 3flashes/sequenz void istmirwarm(void){if (((analogRead(temp)-500)*2) < tbfanpowder){tbfanpowder--;} else {tbfanpowder++;}}//ops 500? should be 2000 if 10k hmz must be wrong falue piced intresing oneline temperaturregulation isn#t it? void cooldown(void){ coolcach++;if(coolcach==(1200-tbfanpowder)){digitalWrite(fan,HIGH);}if(coolcach>1200){digitalWrite(fan, LOW);coolcach=0;}} void istinput(void){ onpress[2]++; if (onpress[2] >20) { if (digitalRead(t2) == HIGH && onpress[0] ==0 ) { onpress[0] =1;ratemal();digitalWrite(strobe1,HIGH);} if (onpress[0] == 1) { onpress[1]++;} if (onpress[1] >= 5) { onpress[1] =0; onpress[0]=0; }onpress[2]=0;}} uint8_t maxx=190; void pulspowder(void) { for (uint8_t fcount=0; fcount <=maxx; fcount++) {//oh have to change this back to old system caused writing HIGH or LOW 1800x each cyclus to inhibit the whole programm cooldown(); if(fcount==0){allof();} if (fcount <= (maxx-1) && fcount >=1) { if (fcount==(maxx-strop[0])) {digitalWrite(strobe1,HIGH);} if (fcount==(maxx-strop[1])) {digitalWrite(strobe2,HIGH);} if (fcount==(maxx-strop[2])) {digitalWrite(strobe3,HIGH);} if (fcount==(maxx-strop[3])) {digitalWrite(strobe4,HIGH);} if (fcount==(maxx-strop[4])) {digitalWrite(strobe5,HIGH);} if (fcount==(maxx-strop[5])) {digitalWrite(strobe6,HIGH);} if (fcount==(maxx-strop[6])) {digitalWrite(strobe7,HIGH);} if (fcount==(maxx-strop[7])) {digitalWrite(strobe8,HIGH);} if (fcount==(maxx-strop[8])) {digitalWrite(strobe9,HIGH);} if (fcount==(maxx-strop[9])) {digitalWrite(strobe10,HIGH);} if (fcount==(maxx-strop[10])) {digitalWrite(strobe11,HIGH);} if (fcount==(maxx-strop[11])) {digitalWrite(strobe12,HIGH);} if (fcount==(maxx-strop[12])) {digitalWrite(strobe13,HIGH);} if (fcount==(maxx-strop[13])) {digitalWrite(strobe14,HIGH);} if (fcount==(maxx-strop[14])) {digitalWrite(strobe15,HIGH);} if (fcount==(maxx-strop[15])) {digitalWrite(strobe16,HIGH);} if (fcount==(maxx-strop[16])) {digitalWrite(strobe17,HIGH);} if (fcount==(maxx-strop[17])) {digitalWrite(strobe18,HIGH);} if (fcount==(maxx-strop[18])) {digitalWrite(strobe19,HIGH);} if (fcount==(maxx-strop[19])) {digitalWrite(strobe20,HIGH);} if (fcount==(maxx-strop[20])) {digitalWrite(strobe21,HIGH);} if (fcount==(maxx-strop[21])) {digitalWrite(strobe22,HIGH);} if (fcount==(maxx-strop[22])) {digitalWrite(strobe23,HIGH);} if (fcount==(maxx-strop[23])) {digitalWrite(strobe24,HIGH);}} if (fcount>=maxx){allof();}}} void allof(void){ digitalWrite(strobe1, LOW);digitalWrite(strobe2, LOW);digitalWrite(strobe3, LOW);digitalWrite(strobe4, LOW);digitalWrite(strobe5, LOW);digitalWrite(strobe6, LOW); digitalWrite(strobe7, LOW);digitalWrite(strobe8, LOW);digitalWrite(strobe9, LOW);digitalWrite(strobe10, LOW);digitalWrite(strobe11, LOW);digitalWrite(strobe12, LOW); digitalWrite(strobe13, LOW);digitalWrite(strobe14, LOW);digitalWrite(strobe15, LOW);digitalWrite(strobe16, LOW);digitalWrite(strobe17, LOW);digitalWrite(strobe18, LOW); digitalWrite(strobe19, LOW);digitalWrite(strobe20, LOW);digitalWrite(strobe21, LOW);digitalWrite(strobe22, LOW);digitalWrite(strobe23, LOW);digitalWrite(strobe24, LOW); }