//6x 3Watt high power RGB led lightdrugtry //drivingvoltage atualle 5.2Volt(!more kills blue) //supply: 8x 18650 Li-ion(parralel to cells 2x TP4056 charger) >6A switch> bost step-up //have fun :3 do with it whatever want to //WARNING better not change this kote if not have understand it if rebuild this psychedelic breinhack musicvisualizing exactly like in pictures //versions 1x mobils smal 4x 18650 //1x stationary 8x18650 (finished in video) /*pictures * */ #define strobe1 PC13 #define strobe2 PC14 #define strobe3 PC15 #define strobe4 PA0 #define strobe5 PA1 #define strobe6 PA2 #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 t1 PA12 #define t2 PA15 #define channelz 18 #define sqsteps 24 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(t1,INPUT); allof();delay(300);ratemal();}// void loop(){zeitreise();}// uint16_t beatsplit,strop[channelz+1],helligkeiten[channelz+1],newtrigger,blinkdata[sqsteps+1][channelz+1],isoncount,isoncount2,picker,einie,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,40,40,0,80,0,120};//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>24){ratemal();newtrigger=random(1,4)*3;}}//ratemal(); for(uint8_t fiz=0;fiz= (6000/(doubleup)*8)){for(uint8_t fap=0;fap=5){strop[fu]-=5;}if(strop[fu]>=1){strop[fu]-=1;}}}dimmer = micros();}//downfade while ((millis()- perma) >= timez){ lazersp++; // if((lazersp%6)==0){strop[10]=50;} if (lazersp >12){lazersp=1; blauer++;if (blauer >=3){blauer=1;}maybe++;maybe2++; // if(blauer==1){strop[0]=20;} // if(blauer==2){strop[5]=20;} if(maybe>randr&&blauer==1){} if(maybe>(randr*2+2)){randr=random(3,6);} if(maybe2>randr2&&blauer==2){} if(maybe2>(randr2+4)){randr2=random(4,8);}} perma =millis(); } while ((micros()- littletime) >= 2){pulspowder();littletime = micros();}//istinput();pulspowder();pulspowder(); } void ratemal(void){ zufall=random(0,100); speedymem++;if(speedymem>=2){speedymem=0;speedy=random(0,6);} einie=random(0,40); if(modi==3 && zufall <20){doubleup=moden[0];} if(modi==3 && zufall >=20&& zufall <40){doubleup=moden[1];} if(modi==3 && zufall >=40&& zufall <80){doubleup=moden[2];} if(modi==3 && zufall >=80){doubleup=moden[3];} for(uint8_t tik=0;tik<=sqsteps;tik++){for(uint8_t tok=0;tok=5&& einie<15){if((wisch%2)==0){picker=random(0,channelz);blinkdata[wisch][picker]=helligkeiten[picker];}} if(einie>=15&&einie<25){if((wisch%4)==0){picker=random(0,channelz);blinkdata[wisch][picker]=helligkeiten[picker];}} } for(uint8_t ranz=0;ranz<2;ranz++){for(uint8_t wasch=0;wasch=10){isoncount++;}}if(isoncount>=1){isoncount2++;}}if(isoncount2<(sqsteps-14)){ratemal();}}//try solong until minimum 3flashes/sequenz void pulspowder(void) { for (uint16_t fcount=0; fcount <=maxx; fcount++) { 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){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); }