void irem() { if (irrecv.decode(&results)) { // Serial.println(results.value, HEX); irrecv.resume(); // Receive the next value digitalWrite(13, HIGH); //on off E10332D //photo E106678 //display E10EAF4 //datatime E10E6F8 //audiodub E10908E //play E10504E //rew E10405E //FF E10C0DE //pause E10607E //stop E10001E //leftstill E10E0FE //rightstill E10F0EE //menu E106A74 //enter E101A04 //right E904BD5 //left E90CB55 //up E900B95 //down E908B15 //search E90019F //zoom T E104658 //zoom W E10C6D8 if(results.value == 0xE10607E) //pause {mr66=0; mode=0; for (int i = 0; i < NUM_LEDS; i++) { leds[i] = CRGB::Black; // OFF. FastLED.show(); } } if(results.value == 0xE10504E) //play { mode=0; for (int i = 0; i < NUM_LEDS; i++) { leds[i] = CRGB::White; // Белый цвет. FastLED.show(); } } if(results.value == 0xE10001E)// stop { if(o3==0) {digitalWrite(4, HIGH); o3=1; }else{ digitalWrite(4, LOW); o3=0; } } if(results.value == 0xE10E0FE) //leftstill E10E0FE { if(mode==0) { for (int i = 0; i < NUM_LEDS; i++) { leds[i] = (CRGB(250, 10, 250)); // Сине-фиолетовый цвет. FastLED.show(); } } if(mode==1) { for (int i = 0; i < NUM_LEDS; i=i+2) { leds[i] = (CRGB(255, 10, 250)); // Сине-фиолетовый цвет. FastLED.show(); } } if(mode==2) { for (int i = 0; i < NUM_LEDS; i=i+4) { leds[i] = (CRGB(255, 10, 250)); // Сине-фиолетовый цвет. FastLED.show(); } } if(mode==6) {mode=1; mr66=0; mr77=0; } if(mode==7) {mode=1; mr66=0; mr77=0; } } if(results.value == 0xE10F0EE) //rightstill E10F0EE { if(mode==0) { for (int i = 0; i < NUM_LEDS; i++) { leds[i] = (CRGB(255, 30,30)); // Сиреневый цвет.{r=255;g=30;b=30;} FastLED.show(); } } if(mode==1) { for (int i = 0; i < NUM_LEDS; i=i+2) { leds[i] = (CRGB(255, 30,30)); // Сиреневый цвет. FastLED.show(); } } if(mode==2) { for (int i = 0; i < NUM_LEDS; i=i+4) { leds[i] = (CRGB(255, 30,30)); // Сиреневый цвет. FastLED.show(); } } if(mode==6) {mode=1; mr66=0; mr77=0; } if(mode==7) {mode=1; mr66=0; mr77=0; } } if(results.value == 0xE101A04) //enter E101A04 { //if(curm==0){curm=1;} //curm=1; } //display E10EAF4 if(results.value == 0xE10EAF4) //display { //settimer=1; menu=2; } if(results.value == 0xE10E6F8) //datatime E10E6F8 {settim=1; } if(results.value == 0xE90019F) //search E90019F {ustt1=1; } if(results.value == 0xE10405E) //rew E10405E {//timer1(); if(zakat==0) { mode=7;//закат s=1; zak=1; rasvet=0; zakat=1; timon1=0; delay(500); } } if(results.value == 0xE10C0DE) //ff {if(rasvet==0) { mode=6;//рассвет s=1; rasv=1; rasvet=1; zakat=0; timon1=0; delay(500); } } //******************* if(results.value == 0xE106678) //E106678 foto {//nigtset (); //menu=5; if(o2==0) {digitalWrite(3, HIGH); o2=1; }else{ digitalWrite(3, LOW); o2=0; } /*rgb1++; if(rgb1>7)rgb1=0; int r; int g; int b; if(rgb1==0){r=255;g=0;b=0;}//кр if(rgb1==1){r=255;g=40;b=0;}//ор if(rgb1==2){r=255;g=80;b=0;}//жел if(rgb1==3){r=0;g=255;b=0;}//зел if(rgb1==4){r=0;g=255;b=255;}//гол if(rgb1==5){r=0;g=0;b=255;}//син if(rgb1==6){r=255;g=0;b=255;}//фиол if(rgb1==7){r=0;g=0;b=0;}//черн for (int i = 0; i < NUM_LEDS; i=i+2) { leds[i] = (CRGB(r,g,b)); // (CRGB(100, 10,100)); leds[i+1] = (CRGB(0, 0,0)); // (CRGB(100, 10,100)); FastLED.show(); } */ } //****************************** if(results.value == 0xE908B15) //down { if(curm==1){n1=!n1;} if(curm==2){o2=!o2;} if(curm==3){o3=!o3;} if(curm==4){n4=!n4;} if(curm==5){n5=!n5;} if(curm==6) {l1=l1-1; if(l1<0){l1=0;} } if(curm==7) {l2=l2-1; if(l2<0){l2=0;} } if(curm==8) {l3=l3-1; if(l3<0){l3=0;} } if(curm>5) {ulamp (); } else {uprav (); } } if(results.value == 0xE900B95) //up E900B95 { if(curm==1){n1=!n1;} if(curm==2){o2=!o2;} if(curm==3){o3=!o3;} if(curm==4){n4=!n4;} if(curm==5){n5=!n5;} if(curm==6) {l1=l1+1; if(l1>100){l1=100;} } if(curm==7) {l2=l2+1; if(l2>100){l2=100;} } if(curm==8) {l3=l3+1; if(l3>100){l3=100;} } if(curm>5) {ulamp (); } else {uprav (); } } if(results.value == 0xE10908E) //audio перекл между l2 l3 лампами { aud++; if(aud>2)aud=0; if(aud==0)curm=0; if(aud==1)curm=7; if(aud==2)curm=8; } if(results.value == 0xE90CB55) //left { curm--; if(curm<1){curm=8;} } if(results.value == 0xE904BD5)//right {curm++; if(curm>8){curm=1;} } if(results.value == 0xE106A74) //menu { //menu=0; aud=0; if(curm>0){ curm=0; nagruz (); ulamp (); } } //************************************************************* if(results.value == 0xE10332D) //on off //zoom W 10C6D8 {n5=1;// флаг таймера digitalWrite(6, HIGH); // включает 5 timer if(on1==0) {lm2=100;//% на экране l2=100;//% на лампу Л2 // analogWrite(12,255); lm3=100;//% на экране l3=100; // analogWrite(8,255); on1=1; } else {lm2=0;//% на экране l2=0; // analogWrite(12,0); lm3=0;//% на экране l3=0; on1=0; n5=0;// флаг таймера digitalWrite(6,LOW); // выключает 5 timer } ulamp ();//l2 l3 рег в процентах от 0% до 100% } //************************************************************** if(results.value == 0xE104658) //zoom T 104658+ //zoom W 10C6D8 {on1=1;//флаг вкл освещ if(curm==0)aud==0; if(curm==7)aud==1; if(curm==8)aud==2; if(aud==0) {zoom2=zoom2+20; zoom3=zoom3+20; if(zoom2>100)zoom2=0; if(zoom3>100)zoom3=0; lm2=zoom2;//% на экране l2=zoom2; lm3=zoom3;//% на экране l3=zoom3; ulamp ();//l2 l3 рег в процентах от 0% до 100% } if(aud==1) {zoom2=zoom2+20; //zoom3=zoom3+20; if(zoom2>100)zoom2=0; //if(zoom3>100)zoom3=0; lm2=zoom2;//% на экране l2=zoom2; //lm3=zoom3;//% на экране //l3=zoom3; ulamp ();//l2 l3 рег в процентах от 0% до 100% } if(aud==2) {//zoom2=zoom2+20; zoom3=zoom3+20; //if(zoom2>100)zoom2=0; if(zoom3>100)zoom3=0; //lm2=zoom2;//% на экране //l2=zoom2; lm3=zoom3;//% на экране l3=zoom3; ulamp ();//l2 l3 рег в процентах от 0% до 100% } } if(results.value == 0xE10C6D8) //zoom W 10C6D8- {on1=1;//флаг вкл освещ if(curm==0)aud==0; if(curm==7)aud==1; if(curm==8)aud==2; if(aud==0)//для обеих ламп {zoom2=zoom2+1; zoom3=zoom3+1; if(zoom2>100)zoom2=0; if(zoom3>100)zoom3=0; lm2=zoom2;//% на экране l2=zoom2; lm3=zoom3;//% на экране l3=zoom3; ulamp ();//l2 l3 рег в процентах от 0% до 100% } if(aud==1)//для лампы 2 {zoom2=zoom2+1; //zoom3=zoom3+1; if(zoom2>100)zoom2=0; //if(zoom3>100)zoom3=0; lm2=zoom2;//% на экране l2=zoom2; //lm3=zoom3;//% на экране //l3=zoom3; ulamp ();//l2 l3 рег в процентах от 0% до 100% } if(aud==2)//для лампы 3 {//zoom2=zoom2+1; zoom3=zoom3+1; //if(zoom2>100)zoom2=0; if(zoom3>100)zoom3=0; //lm2=zoom2;//% на экране //l2=zoom2; lm3=zoom3;//% на экране l3=zoom3; ulamp ();//l2 l3 рег в процентах от 0% до 100% } } //***************************************************************************************************** if (results.value == 0xFFB24D) { //FLASH mode=1; s=1; } if (results.value == 0xFF00FF) { //STROBE mode=2; s=1; } if (results.value == 0xFF58A7) { //FADE mode=6; s=1; } if (results.value == 0xFF30CF) { //FADE mode=7; s=1; } //************************************OFF************************* if (results.value == 0xFFF807) { mode=0; for (int i = 0; i < NUM_LEDS; i++) { leds[i] = CRGB::Black; // OFF. FastLED.show(); } rasvet=0; zakat=1; } //************************************On************************* if (results.value == 0xFFB04F) { mode=0; for (int i = 0; i < NUM_LEDS; i++) { leds[i] = CRGB::White; // Белый цвет. FastLED.show(); } rasvet=1; zakat=0; } //************************************ ↑ ************************* if (results.value == 0xFF906F) { int b=20; if (new_bright_f<100) {b=10; } if (new_bright_f<50) {b=5; } if (new_bright_f<10) {b=1; } new_bright_f=new_bright_f+b; if(new_bright_f>max_bright) { new_bright_f=max_bright; } LEDS.setBrightness(new_bright_f); // установить новую яркость FastLED.show(); } //************************************ ↓ ************************* if (results.value == 0xFFB847) { int b=20; if (new_bright_f<100) {b=10; } if (new_bright_f<50) {b=5; } if (new_bright_f<10) {b=1; } new_bright_f=new_bright_f-b; if(new_bright_f