Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*PROJETO AUTOMAÇÃO 1.6 (QUARTO)
- Ajuda a desenvolver e dicas no codigo
- Rui Viana lab de garagem , Marcos Lab de garabem e
- Romario de Jesus Santana lab de garagem
- sinceros agradecimentos a todos
- 2018 atualizado*/
- //CONTROLE REMOTO
- #include <IRremote.h>
- #include <SPI.h>
- #include <Ethernet.h> //W5100
- #include <LiquidCrystal.h>
- #include <String.h>
- #define RECV_PIN 2
- IRsend irsend;
- //define receptor IR
- IRrecv irrecv(RECV_PIN);
- decode_results results;
- LiquidCrystal lcd(22,24,26,28,30,32);
- bool rele4=true, rele5=true, rele6=true ;//variaveis para estado do rele
- byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
- IPAddress ip(192, 168, 15, 177);
- EthernetServer server(80);
- //RELES
- int pino_rele4 = 7 ; // Luz Quarto
- int pino_rele6 = 6;// Luz da escada
- int pino_rele5 = 5; // Luz do banheiro
- int sensorquarto = A0; //Pino analógico em que o sensor LDR está conectado.
- int valorSensorquarto = 0; //Usada para ler o valor do sensor em tempo real
- unsigned int S_pwr[67] = {4500, 4350, 650, 1600, 600, 1600, 650, 450, 600, 500, 650, 500, 600, 500, 600, 1600, 600, 500, 650, 1600, 600, 1600, 600, 500, 600, 500, 650, 1600, 600, 500, 600, 1600, 650, 450, 600, 1650, 600, 500, 600, 500, 600, 500, 600, 500, 650, 450, 650, 500, 600, 500, 600, 500, 600, 1600, 600, 1650, 600, 1600, 600, 1600, 600, 1650, 600, 1600, 600, 1600, 650,};
- unsigned int S_fca[67] = {4550, 4350, 650, 1600, 600, 1600, 650, 450, 650, 450, 600, 550, 600, 500, 600, 1600, 650, 450, 600, 1650, 600, 1600, 600, 500, 600, 500, 650, 1600, 600, 500, 600, 1600, 650, 450, 600, 1650, 600, 500, 600, 500, 600, 500, 600, 1600, 600, 550, 600, 500, 600, 500, 600, 500, 650 , 1550, 650, 1600, 600, 1600, 600, 500, 650, 1600, 600, 1600, 600, 1600, 600,};
- unsigned int S_vol[67] = {4500, 4400, 600, 1650, 550, 1650, 600, 500, 600, 500, 600, 500, 600, 550, 600, 1600, 600, 500, 600, 1600, 600, 1650, 600, 500, 600, 500, 600, 1600, 600, 550, 600, 1600, 600, 500, 600, 1600, 600, 1650, 600, 500, 600, 1600, 600, 1650, 600, 1600, 600, 500, 600, 500, 600, 500, 600, 550, 600, 1600, 600, 500, 600, 500, 600, 550, 550, 1650, 600, 1600, 600,};
- unsigned int S_volm[67] = {4500, 4400, 600, 1600, 600, 1650, 600, 500, 600, 500, 600, 500, 600, 500, 600, 1650, 600, 500, 600, 1600, 600, 1650, 600, 500, 600, 500, 600, 1600, 600, 500, 600, 1650, 600, 500, 600, 1600, 600, 1650, 600, 500, 600, 500, 600, 1600, 600, 1650, 600, 500, 600, 500, 600, 500, 600, 500, 600, 1650, 600, 1600, 600, 500, 600, 500, 600, 1650, 600, 1600, 600,};
- unsigned int S_ant[67] = {4550, 4350, 600, 1600, 600, 1600, 650, 500, 600, 500, 600, 500, 650, 450, 650, 1600, 600, 500, 650, 1550, 650, 1600, 600, 500, 650, 450, 650, 1600, 600, 500, 600, 1600, 600, 500, 650, 1600, 600, 1600, 650, 450, 650, 1600, 600, 1600, 650, 450, 650, 500, 600, 500, 600, 500, 650, 450, 650, 1600, 600, 500, 600, 500, 600, 1600, 650, 1600, 650, 1550, 650,};
- unsigned int S_ava[67] = {4500, 4400, 550, 1650, 600, 1600, 600, 500, 600, 500, 600, 550, 600, 500, 600, 1600, 600, 500, 600, 1650, 600, 1600, 600, 500, 600, 500, 600, 1650, 600, 500, 600, 1600, 600, 500, 600, 1650, 600, 1600, 600, 500, 600, 500, 600, 1650, 600, 500, 550, 550, 600, 500, 600, 500, 600, 500, 600, 1650, 600, 1600, 600, 500, 600, 1650, 600, 1600, 550, 1650, 600,};
- unsigned int S_pla[67] = {4500, 4400, 550, 1650, 600, 1600, 600, 500, 600, 500, 600, 550, 600, 500, 600, 1600, 600, 500, 600, 1650, 600, 1600, 600, 500, 600, 500, 600, 1650, 600, 500, 600, 1600, 600, 500, 600, 1650, 600, 1600, 600, 500, 600, 500, 600, 1650, 600, 500, 550, 550, 600, 500, 600, 500, 600, 500, 600, 1650, 600, 1600, 600, 500, 600, 1650, 600, 1600, 550, 1650, 600,};
- unsigned int S_cim[67] = {4500, 4400, 550, 1700, 550, 1650, 550, 550, 550, 550, 550, 600, 550, 550, 550, 1650, 550, 550, 550, 1700, 550, 1650, 550, 550, 550, 550, 550, 1700, 550, 550, 550, 1650, 550, 600, 550, 1650, 550, 550, 550, 1650, 550, 1700, 550, 550, 550, 550, 550, 550, 550, 600, 550, 550, 550, 1650, 550, 550, 550, 600, 550, 1650, 550, 1650, 550, 1700, 550, 1650, 550,};
- unsigned int S_bai[67] = {4500, 4400, 600, 1600, 650, 1600, 600, 500, 650, 450, 650, 450, 650, 500, 600, 1600, 600, 500, 650, 1600, 600, 1600, 600, 500, 600, 500, 600, 1650, 600, 500, 600, 1600, 600, 500, 650, 1600, 650, 450, 650, 1550, 650, 500, 600, 1600, 600, 500, 650, 450, 650, 500, 600, 500, 600, 1600, 650, 450, 650, 1600, 600, 500, 600, 1600, 650, 1600, 600, 1600, 600,};
- /// ar condicionado
- unsigned int des_ar[59] = {3208, 9548, 608, 1444, 608, 412, 604, 408, 604, 408, 604, 1448, 604, 432, 604, 412, 604, 408, 608, 1420, 608, 1420, 604, 432, 584, 428, 608, 408, 604, 412, 604, 408, 608, 428, 584, 432, 580, 432, 580, 432, 584, 432, 580, 432, 584, 1444, 580, 432, 580, 1448, 492, 520, 524, 492, 604, 432, 584, 1444, 580,};
- unsigned int modo_ar[59] = {3168, 9640, 524, 1500, 576, 444, 548, 464, 548, 464, 552, 1476, 548, 488, 524, 488, 528, 488, 524, 488, 496, 516, 500, 516, 520, 496, 520, 1528, 524, 492, 520, 1508, 520, 492, 520, 496, 520, 492, 520, 1528, 500, 1556, 496, 516, 496, 1528, 500, 516, 572, 440, 496, 516, 500, 516, 496, 516, 552, 1476, 520,};
- unsigned int velocidade_ar[61] = {368, 43108, 3152, 9604, 580, 1472, 524, 492, 552, 460, 552, 460, 556, 1472, 552, 464, 576, 436, 576, 436, 580, 1448, 580, 456, 556, 1472, 556, 456, 580, 436, 576, 436, 608, 408, 604, 432, 580, 1448, 604, 432, 584, 1444, 580, 1448, 580, 436, 600, 1448, 580, 436, 572, 440, 572, 1456, 572, 468, 544, 468, 544, 1484, 544,};
- unsigned int aumenta_ar[59] = {3196, 9612, 572, 1452, 524, 516, 500, 512, 500, 516, 496, 1532, 520, 496, 520, 516, 496, 516, 572, 440, 576, 440, 572, 440, 576, 440, 548, 1476, 576, 436, 576, 464, 500, 516, 496, 1528, 500, 516, 496, 516, 576, 1456, 520, 492, 520, 1528, 500, 516, 496, 516, 500, 512, 576, 1452, 572, 440, 520, 1532, 500,};
- unsigned int diminui_ar[59] = {3184, 9624, 552, 1504, 524, 488, 584, 428, 584, 432, 584, 1468, 604, 436, 584, 428, 584, 432, 584, 428, 584, 428, 584, 432, 584, 428, 584, 1468, 584, 428, 584, 432, 584, 428, 540, 1488, 608, 432, 584, 428, 496, 516, 500, 516, 496, 1556, 584, 428, 584, 428, 500, 516, 596, 1432, 608, 428, 500, 516, 608,};
- unsigned int lig_ar[59] = {3188, 9684, 604, 1464, 612, 436, 584, 436, 584, 436, 580, 1468, 600, 420, 600, 420, 600, 420, 576, 468, 576, 444, 560, 460, 504, 520, 576, 468, 552, 468, 556, 464, 584, 436, 528, 492, 580, 1468, 576, 1464, 576, 444, 576, 468, 556, 1484, 584, 436, 584, 436, 564, 1480, 556, 464, 556, 1492, 572, 468, 552,};
- void setup() {
- pinMode(pino_rele4, OUTPUT); // Quarto
- pinMode(pino_rele5, OUTPUT); // banheiro
- pinMode(pino_rele6, OUTPUT); // escada
- //Desliga os reles
- digitalWrite(pino_rele4, HIGH); // Quarto
- digitalWrite(pino_rele5, HIGH); // banheiro
- digitalWrite(pino_rele6, HIGH); // escada
- Ethernet.begin(mac, ip);
- Serial.begin(9600);
- server.begin();
- Serial.println();
- //Controle remoto mega pin 9
- pinMode(9, OUTPUT);
- digitalWrite(9, LOW);
- irrecv.enableIRIn();
- lcd.begin(16, 2); //Inicia o LCD com dimensões 16x2(Colunas x Linhas)
- lcd.print("Automacao Luckas");
- lcd.setCursor(0,1);
- }
- void loop() {
- {
- ////sensor quarto/////
- if (valorSensorquarto>= 1000);{
- Serial.println("Ligado");
- Serial.print ("Luz Quarto Desligado");
- }
- if (valorSensorquarto< 970)
- {
- Serial.println("Ligado");
- Serial.print ("Luz Quarto Ligada");
- int valorSensorquarto = analogRead(sensorquarto);
- Serial.println(valorSensorquarto);
- delay(1000);
- }
- EthernetClient client = server.available();
- if (client) {
- String vars;
- byte acao = 0;
- boolean currentLineIsBlank = true;
- while (client.connected()) {
- if (client.available()) {
- char c = client.read();
- vars.concat(c);
- //Página Html//
- if (c == '\n') {
- client.println(F("HTTP/1.1 200 OK"));
- client.println(F("Content-Type: text/html"));
- client.println();
- client.println(F("<!doctype html>"));
- client.println(F("<head>"));
- client.println(F("<meta charset=\"utf-8\">"));
- client.println(F("<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\""));
- client.println(F("<title>Automação meu QUARTO</title>"));
- client.println(F("<meta name=\"viewport\" content=\"width=320\">"));
- client.println(F("<meta name=\"viewport\" content=\"width=device-width\">"));
- client.println(F("<meta charset=\"utf-8\">"));
- client.println(F("<meta name=\"viewport\" content=\"initial-scale=1.0, user-scalable=no\">"));
- client.println(F("</head>"));
- client.println(F("<body>"));
- client.println(F("<center>"));
- client.println(F("<meta charset=\"utf-8\">"));
- client.println(F("<font size=\"5\" face=\"verdana\" color=\"green\">AUTOMATIZANDO</font>"));
- client.println(F("<font size=\"5\" face=\"verdana\" color=\"blue\"> QUARTO do Lucas</font><br />"));
- client.println(F("</center>"));
- client.println(" </div>");
- ///REles ////////
- client.println("<div style='position:absolute;margin-left:1px;margin-top:10px;width:600px;height:140px;z-index:1'>");
- client.println("<a href=?sala><button style= width:200px;height:50px; ’border-height: 1px solid #ff0000; border-left: 1px solid #ff0000′ type=’button’>Quarto</button></a>");
- if(valorSensorquarto< 970)
- {
- client.println("<button style= width:100px;height:50px; ’border-height: 1px solid #006400; border-left: 1px solid #006400′ type=’button’>Quarto LIGADO</button>");
- }
- else if (valorSensorquarto>= 1000)
- {
- client.println("<button style= width:100px;height:50px; ’border-height: 1px solid #FF4040; border-left: 1px solid #FF4040′ type=’button’>Quarto DESLIGADO</button>");
- client.println(" </div>");
- }
- ///////////////////////////////////////
- client.println(F("<form action=\"/quarto\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">Quarto -</button> "));
- client.println(F("</form> <br />"));
- ///banheiro
- client.println(F("<form action=\"/banheiro\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">On-Off Banheiro</button> "));
- client.println(F("</form> <br />"));
- ///escada
- client.println(F("<form action=\"/escada\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">On-Off Escada</button> "));
- client.println(F("</form> <br />"));
- //// receptor
- client.println(F("<font size=\"5\" face=\"verdana\" color=\"green\">Controle Receptor</font>"));
- client.println(F("<form action=\"/receptor\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">On Off Receptor</button> "));
- client.println(F("</form> <br />"));
- client.println(F("<form action=\"/cima\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">Cima </button> "));
- client.println(F("</form> <br />"));
- client.println(F("<form action=\"/setadireita\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">Direita </button> "));
- client.println(F("</form> <br />"));
- client.println(F("<form action=\"/setaesquerda\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">Esquerda </button> "));
- client.println(F("</form> <br />"));
- client.println(F("<form action=\"/ok\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">oK </button> "));
- client.println(F("</form> <br />"));
- client.println(F("<form action=\"/baixo\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">Baixo </button> "));
- client.println(F("</form> <br />"));
- client.println(F("<form action=\"/cenatv\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">Cena - TV </button> "));
- client.println(F("</form> <br />"));
- client.println(F("<form action=\"/exitre\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">Exit</button> "));
- client.println(F("</form> <br />"));
- client.println(F("<form action=\"/sleep\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">Temporizador</button> "));
- client.println(F("</form> <br />"));
- client.println(F("<form action=\"/recmenu\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">Menu</button> "));
- client.println(F("</form> <br />"));
- client.println(F("<form action=\"/+10\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">+10</button> "));
- client.println(F("</form> <br />"));
- client.println(F("<form action=\"/-10\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">-10</button> "));
- client.println(F("</form> <br />"));
- client.println(F("<form action=\"/canal1\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">1</button> "));
- client.println(F("</form> <br />"));
- client.println(F("<form action=\"/2\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">2</button> "));
- client.println(F("</form> <br />"));
- client.println(F("<form action=\"/3\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">3</button> "));
- client.println(F("</form> <br />"));
- client.println(F("<form action=\"/4\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">4</button> "));
- client.println(F("</form> <br />"));
- client.println(F("<form action=\"/5\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">5</button> "));
- client.println(F("</form> <br />"));
- client.println(F("<form action=\"/6\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">6</button> "));
- client.println(F("</form> <br />"));
- client.println(F("<form action=\"/7\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">7</button> "));
- client.println(F("</form> <br />"));
- client.println(F("<form action=\"/8\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">8</button> "));
- client.println(F("</form> <br />"));
- client.println(F("<form action=\"/9\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">9</button> "));
- client.println(F("</form> <br />"));
- client.println(F("<form action=\"/0\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">0</button> "));
- client.println(F("</form> <br />"));
- client.println(F("<form action=\"/info\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">Informacao</button> "));
- client.println(F("</form> <br />"));
- client.println(F("<form action=\"/radio\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">Radio</button> "));
- client.println(F("</form> <br />"));
- client.println(F("<form action=\"/mutrec\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">Mudo</button> "));
- client.println(F("</form> <br />"));
- ////controletv
- client.println(F("<font size=\"5\" face=\"verdana\" color=\"green\">Controle Tv</font>"));
- client.println(F("<form action=\"/tv\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">On-Off TV</button> "));
- client.println(F("</form> <br />"));
- client.println(F("<form action=\"/input\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">Input</button> "));
- client.println(F("</form> <br />"));
- client.println(F("<form action=\"/setacima\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">Cima </button> "));
- client.println(F("</form> <br />"));
- client.println(F("<form action=\"/setabaixo\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">Baixo</button> "));
- client.println(F("</form> <br />"));
- client.println(F("<form action=\"/esquerdatv\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">Esquerda </button> "));
- client.println(F("</form> <br />"));
- client.println(F("<form action=\"/direitatv\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">Direita </button> "));
- client.println(F("</form> <br />"));
- client.println(F("<form action=\"/volume+\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">Vol +</button> "));
- client.println(F("</form> <br />"));
- client.println(F("<form action=\"/volume-\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">Vol -</button> "));
- client.println(F("</form> <br />"));;
- client.println(F("<form action=\"/exittv\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">Exit TV</button> "));
- client.println(F("</form> <br />"));
- client.println(F("<form action=\"/voltar\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">Voltar</button> "));
- client.println(F("</form> <br />"));
- client.println(F("<form action=\"/mutetv\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">Mudo</button> "));
- client.println(F("</form> <br />"));
- client.println(F("<form action=\"/enter\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">Enter</button> "));
- client.println(F("</form> <br />"));
- client.println(F("<form action=\"/temp\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">Temporizar TV</button> "));
- client.println(F("</form> <br />"));
- client.println(F("<form action=\"/netflix\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">Netflix</button> "));
- client.println(F("</form> <br />"));
- client.println(F("<form action=\"/menutv\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">Menu TV</button> "));
- client.println(F("</form> <br />"));
- client.println(F("<form action=\"/internet\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">Internet TV</button> "));
- client.println(F("</form> <br />"));
- /// CONTROLE HOME
- client.println(F("<font size=\"5\" face=\"verdana\" color=\"green\">Controle Home</font>"));
- client.println(F("<form action=\"/home\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">On Off Home</button> "));
- client.println(F("</form> <br />"));
- client.println(F("<form action=\"/funcao\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">Função</button> "));
- client.println(F("</form> <br />"));
- client.println(F("<form action=\"/volmenoshome\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">Vol -</button> "));
- client.println(F("</form> <br />"));
- client.println(F("<form action=\"/volmaishome\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">Vol +</button> "));
- client.println(F("</form> <br />"));
- client.println(F("<form action=\"/anterior\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">Anterior</button> "));
- client.println(F("</form> <br />"));
- client.println(F("<form action=\"/avancar\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">Avançar TV</button> "));
- client.println(F("</form> <br />"));
- client.println(F("<form action=\"/play\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">Play</button> "));
- client.println(F("</form> <br />"));
- client.println(F("<form action=\"/btncim\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">Cima</button> "));
- client.println(F("</form> <br />"));
- /// apartir daqui nao funciona comando
- client.println(F("<form action=\"/btnbai\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">Baixo</button> "));
- client.println(F("</form> <br />"));
- ///Controle ar Condicionado
- client.println(F("<font size=\"5\" face=\"verdana\" color=\"green\">Controle Ar Condicionado</font>"));
- client.println(F("<form action=\"/ligarar\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">On Ar</button> "));
- client.println(F("</form> <br />"));
- client.println(F("<form action=\"/desliga_ar\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">Off Ar </button> "));
- client.println(F("</form> <br />"));
- client.println(F("<form action=\"/modo\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">Modo</button> "));
- client.println(F("</form> <br />"));
- client.println(F("<form action=\"/velocidade\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">Velocidade</button> "));
- client.println(F("</form> <br />"));
- client.println(F("<form action=\"/menosar\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">Ar -</button> "));
- client.println(F("</form> <br />"));
- client.println(F("<form action=\"/maisar\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">Ar + </button> "));
- client.println(F("</form> <br />"));
- ///fita de led
- client.println(F("<font size=\"5\" face=\"verdana\" color=\"green\">Fita de Led</font>"));
- client.println(F("<form action=\"/led\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">On Off Led </button> "));
- client.println(F("</form> <br />"));
- client.println(F("<form action=\"/aumenta\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">Aumenta </button> "));
- client.println(F("</form> <br />"));
- client.println(F("<form action=\"/diminui\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">Diminui </button> "));
- client.println(F("</form> <br />"));
- client.println(F("<form action=\"/azul\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">Azul </button> "));
- client.println(F("</form> <br />"));
- client.println(F("<form action=\"/vermelho\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">Vermelho </button> "));
- client.println(F("</form> <br />"));
- client.println(F("<form action=\"/verde\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">Verde </button> "));
- client.println(F("</form> <br />"));
- client.println(F("<form action=\"/branco\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">Branco </button> "));
- client.println(F("</form> <br />"));
- client.println(F("<form action=\"/flash\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">Flash </button> "));
- client.println(F("</form> <br />"));
- client.println(F("<form action=\"/efei1\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">Efeito 1 </button> "));
- client.println(F("</form> <br />"));
- client.println(F("<form action=\"/efei2\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">Efeito 2 </button> "));
- client.println(F("</form> <br />"));
- client.println(F("<form action=\"/efei3\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">Efeito 3 </button> "));
- client.println(F("</form> <br />"));
- client.println(F("<form action=\"/efei4\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">Efeito 4 </button> "));
- client.println(F("</form> <br />"));
- client.println(F("<form action=\"/slow\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">Slow </button> "));
- client.println(F("</form> <br />"));
- client.println(F("<form action=\"/quick\" method=\"get\">"));
- client.println(F("<button type=submit style=\"width:200px;\">Quick</button> "));
- client.println(F("</form> <br />"));
- client.println(F(""));
- client.println(F("</center>"));
- client.println(F("</body>"));
- client.println(F("</html>"));
- break;
- }//final if \n
- }//final client.avaliable
- //AQUI ACONTECEM AS COMPARACOES(Receptor)
- /// if (vars.endsWith(F("/ligarec"))) acao = 2;
- if (vars.endsWith(F("/cenatv"))) acao = 3;
- else if (vars.endsWith(F("/ok"))) acao = 4;
- else if (vars.endsWith(F("/setadireita"))) acao = 5;
- else if (vars.endsWith(F("/setaesquerda"))) acao = 6;
- else if (vars.endsWith(F("/cima"))) acao = 7;
- else if (vars.endsWith(F("/baixo"))) acao = 8;
- else if (vars.endsWith(F("/exitre"))) acao = 9;
- else if (vars.endsWith(F("/sleep"))) acao=10;
- else if (vars.endsWith(F("/recmenu"))) acao=11;
- else if (vars.endsWith(F("/+10"))) acao=12;
- else if (vars.endsWith(F("/canal1"))) acao=13;
- else if (vars.endsWith(F("/2"))) acao=14;
- else if (vars.endsWith(F("/3"))) acao=15;
- else if (vars.endsWith(F("/4"))) acao=16;
- else if (vars.endsWith(F("/5"))) acao=17;
- else if (vars.endsWith(F("/6"))) acao=18;
- else if (vars.endsWith(F("/7"))) acao=19;
- else if (vars.endsWith(F("/8"))) acao = 20;
- else if (vars.endsWith(F("/9"))) acao = 21;
- else if (vars.endsWith(F("/0"))) acao = 22;
- else if (vars.endsWith(F("/receptor"))) acao = 55;
- else if (vars.endsWith(F("/info"))) acao = 71;
- else if (vars.endsWith(F("/radio"))) acao = 73;
- else if (vars.endsWith(F("/mutrec"))) acao = 74;
- else if (vars.endsWith(F("/-10"))) acao=75;
- /// Rele
- else if (vars.endsWith(F("/quarto"))) acao = 23;
- else if (vars.endsWith(F("/banheiro"))) acao = 24;
- else if (vars.endsWith(F("/quarto"))) acao = 23;
- else if (vars.endsWith(F("/escada"))) acao = 72;
- /// Controle TV
- else if (vars.endsWith(F("/tv"))) acao = 25;
- else if (vars.endsWith(F("/input"))) acao = 26;
- else if (vars.endsWith(F("/menutv"))) acao = 27;
- else if (vars.endsWith(F("/setacima"))) acao = 28;
- else if (vars.endsWith(F("/setabaixo"))) acao = 29;
- else if (vars.endsWith(F("/esquerdatv"))) acao = 30;
- else if (vars.endsWith(F("/direitatv"))) acao = 31;
- else if (vars.endsWith(F("/volume+"))) acao = 32;
- else if (vars.endsWith(F("/volume-"))) acao = 33;
- else if (vars.endsWith(F("/exittv"))) acao = 34;
- else if (vars.endsWith(F("/voltar"))) acao = 35;
- else if (vars.endsWith(F("/mutetv"))) acao = 36;
- else if (vars.endsWith(F("/temp"))) acao = 37;
- else if (vars.endsWith(F("/netflix"))) acao = 38;
- else if (vars.endsWith(F("/enter"))) acao = 39;
- else if (vars.endsWith(F("/internet"))) acao = 70;
- /// Controle HOME
- else if (vars.endsWith(F("/home"))) acao = 40;
- else if (vars.endsWith(F("/funcao"))) acao = 41;
- else if (vars.endsWith(F("/volmenoshome"))) acao = 42;
- else if (vars.endsWith(F("/volmaishome"))) acao = 43;
- else if (vars.endsWith(F("/anterio"))) acao = 44;
- else if (vars.endsWith(F("/avancar"))) acao = 45;
- else if (vars.endsWith(F("/play"))) acao = 46;
- else if (vars.endsWith(F("/btncim"))) acao = 47;
- /// apartir daqui nao funciona comando
- else if (vars.endsWith(F("/btnbai"))) acao = 48;
- //Controle Ar
- else if (vars.endsWith(F("/ligarar"))) acao = 49;
- else if (vars.endsWith(F("/desliga_ar"))) acao = 50;
- else if (vars.endsWith(F("/modo"))) acao = 51;
- else if (vars.endsWith(F("/velocidade"))) acao = 52;
- else if (vars.endsWith(F("/maisar"))) acao = 53;
- else if (vars.endsWith(F("/menosar"))) acao = 54;
- /// fita led
- else if (vars.endsWith(F("/led"))) acao = 56;
- else if (vars.endsWith(F("/aumenta"))) acao = 57;
- else if (vars.endsWith(F("/diminui"))) acao = 58;
- else if (vars.endsWith(F("/azul"))) acao = 59;
- else if (vars.endsWith(F("/vermelho"))) acao = 60;
- else if (vars.endsWith(F("/verde"))) acao = 61;
- else if (vars.endsWith(F("/branco"))) acao = 62;
- else if (vars.endsWith(F("/flash"))) acao = 63;
- else if (vars.endsWith(F("/efei1"))) acao = 64;
- else if (vars.endsWith(F("/efei2"))) acao = 65;
- else if (vars.endsWith(F("/efei3"))) acao = 66;
- else if (vars.endsWith(F("/efei4"))) acao = 67;
- else if (vars.endsWith(F("/slow"))) acao = 68;
- else if (vars.endsWith(F("/quick"))) acao = 69;
- //// ultima açao 75
- if (acao == 3) { //liga , DESLIGANDO A TV
- //Ligar receptor
- irsend.sendNEC(0xFF50AF, 32);
- delay(200);
- //ligar tv
- irsend.sendNEC(0x2FD48B7, 32);
- Serial.println("tv receptor");
- lcd.setCursor(0,1);
- lcd.print(" Cena TV ");
- acao = 0;
- }
- if (acao == 4) { //Ok
- irsend.sendNEC(0xFFB04F, 32);
- Serial.println("ok");
- lcd.setCursor(0,1);
- lcd.print(" OK ");
- acao = 0;
- }
- if (acao == 5) { //SetaDiretia
- irsend.sendNEC(0xFF8877, 32);
- Serial.println("direita");
- lcd.setCursor(0,1);
- lcd.print(" Direita ");
- acao = 0;
- }
- if (acao == 6) { //seta esquerda
- irsend.sendNEC(0xFF08F7, 32);
- Serial.println("esquerda");
- lcd.setCursor(0,1);
- lcd.print(" Esquerda ");
- acao = 0;
- }
- if (acao == 7) { //Seta cima
- irsend.sendNEC(0xFFD02F, 32);
- Serial.println("cima");
- lcd.setCursor(0,1);
- lcd.print(" Cima ");
- acao = 0;
- }
- if (acao == 8) { //Seta baixo
- irsend.sendNEC(0xFF708F, 32);
- Serial.println("baixo");
- lcd.setCursor(0,1);
- lcd.print(" Baixo ");
- acao = 0;
- }
- if (acao == 9){ //exit
- irsend.sendNEC (0xFF7887, 32);
- Serial.println("exit");
- lcd.setCursor(0,1);
- lcd.print(" Exit ");
- acao = 0;
- }
- if (acao == 10){ //Sleep
- irsend.sendNEC(0xFF6C93, 32);
- Serial.println("sleep");
- lcd.setCursor(0,1);
- lcd.print(" Sleep ");
- acao = 0;
- }
- if (acao == 11){ //Menu
- irsend.sendNEC(0xFF58A7, 32);
- Serial.println("menu");
- lcd.setCursor(0,1);
- lcd.print(" Menu ");
- acao = 0;
- }
- if (acao == 12){ //+10
- irsend.sendNEC(0xFF36C9, 32);
- Serial.println("+10");
- lcd.setCursor(0,1);
- lcd.print(" +10 ");
- acao = 0;
- }
- if (acao == 75){ //-10
- irsend.sendNEC(0xFFB649, 32);
- Serial.println("+10");
- lcd.setCursor(0,1);
- lcd.print(" -10 ");
- acao = 0;
- }
- if (acao == 13){ //canal 1
- irsend.sendNEC(0xFF807F, 32);
- Serial.println("1");
- lcd.setCursor(0,1);
- lcd.print(" 1 ");
- acao = 0;
- }
- if (acao == 70){ //internet
- irsend.sendNEC(0x2FD5BA4, 32);
- Serial.println("internet");
- lcd.setCursor(0,1);
- lcd.print(" Internet ");
- acao = 0;
- }
- if (acao == 14){ //2
- irsend.sendNEC(0xFF40BF, 32);
- Serial.println("2");
- lcd.setCursor(0,1);
- lcd.print(" 2 ");
- acao = 0;
- }
- if (acao == 15){ //3
- irsend.sendNEC(0xFFC03F, 32);
- Serial.println("3");
- lcd.setCursor(0,1);
- lcd.print("");
- acao = 0;
- }
- if (acao == 16){ //4
- irsend.sendNEC(0xFF20DF, 32);
- Serial.println("4");
- lcd.setCursor(0,1);
- lcd.print(" 4 ");
- acao = 0;
- }
- if (acao == 17){ //5
- irsend.sendNEC(0xFFA05F, 32);
- Serial.println("5");
- lcd.setCursor(0,1);
- lcd.print(" 5 ");
- acao = 0;
- }
- if (acao == 18){ //6
- irsend.sendNEC(0xFF609F, 32);
- Serial.println("6");
- lcd.setCursor(0,1);
- lcd.print(" 6 ");
- acao = 0;
- }
- if (acao == 19){ //7
- irsend.sendNEC(0xFFE01F, 32);
- Serial.println("7");
- lcd.setCursor(0,1);
- lcd.print(" 7 ");
- acao = 0;
- }
- if (acao == 20){ //8
- irsend.sendNEC (0xFF10EF, 32);
- Serial.println("8");
- lcd.setCursor(0,1);
- lcd.print(" 8 ");
- acao = 0;
- }
- if (acao == 21){ //9
- irsend.sendNEC(0xFF906F, 32);
- Serial.println("9");
- lcd.setCursor(0,1);
- lcd.print(" 9 ");
- acao = 0;
- }
- if (acao == 22){ //0
- irsend.sendNEC(0xFF00FF, 32);
- Serial.println("0");
- lcd.setCursor(0,1);
- lcd.print(" 0 ");
- acao = 0;
- }
- if (acao == 71){ //info
- irsend.sendNEC(0xFF56A9, 32);
- Serial.println("informacao");
- lcd.setCursor(0,1);
- lcd.print(" Informacao ");
- acao = 0;
- }
- if (acao == 73){ //radio
- irsend.sendNEC(0xFF2CD3, 32);
- Serial.println("radio");
- lcd.setCursor(0,1);
- lcd.print(" Radio ");
- acao = 0;
- }
- if (acao == 74){ //mute
- irsend.sendNEC(0xFFCC33, 32);
- Serial.println("mudo");
- lcd.setCursor(0,1);
- lcd.print(" Mudo ");
- acao = 0;
- }
- if (acao == 55) { //LIGANDO Receptor
- //Ligar receptor
- irsend.sendNEC(0xFF50AF, 32);
- Serial.println("Receptor");
- lcd.setCursor(0,1);
- lcd.print(" Receptor ");
- acao =0;
- ////////////////////// RELES //////////////////////////////////////
- }
- /// Reles
- if (acao == 24) { //Banheiro
- rele5 = !rele5;
- digitalWrite(pino_rele5, rele5);
- Serial.println("banheiro");
- lcd.setCursor(0,1);
- lcd.print(" Luz Banheiro ");
- acao = 0;
- }
- if (acao == 23) { //Quarto
- rele4 = !rele4;
- digitalWrite(pino_rele4, rele4);
- Serial.println("quarto");
- lcd.setCursor(0,1);
- lcd.print(" Luz do Quarto ");
- acao = 0;
- }
- if (acao == 72) { //escada
- rele6 = !rele6;
- digitalWrite(pino_rele6, rele6);
- Serial.println("escaa");
- lcd.setCursor(0,1);
- lcd.print(" Luz da Escada ");
- acao = 0;
- }
- //acao tv
- if (acao == 25){ //ligar tv
- irsend.sendNEC(0x2FD48B7, 32);
- Serial.println("tv");
- lcd.setCursor(0,1);
- lcd.print(" Televisao ");
- acao = 0;
- }
- if (acao == 26){ //input
- irsend.sendNEC(0x2FDF00F, 32);
- Serial.println("input");
- lcd.setCursor(0,1);
- lcd.print(" Input ");
- acao = 0;
- }
- if (acao == 27){ //menu
- irsend.sendNEC(0x2FD01FE, 32);
- Serial.println("menutv");
- lcd.setCursor(0,1);
- lcd.print(" Menu TV ");
- acao = 0;
- }
- if (acao == 28){ //Cima
- irsend.sendNEC(0x2FD41BE, 32);
- Serial.println("cima");
- lcd.setCursor(0,1);
- lcd.print(" Cima ");
- acao = 0;
- }
- if (acao == 29){ //baixo
- irsend.sendNEC(0x2FDC13E, 32);
- Serial.println("baixo");
- lcd.setCursor(0,1);
- lcd.print(" Baixo ");
- acao = 0;
- }
- if (acao == 30){ //Esquerda
- irsend.sendNEC(0x2FDB847, 32);
- Serial.println("esquerda");
- lcd.setCursor(0,1);
- lcd.print(" Esquerda ");
- acao = 0;
- }
- if (acao == 31){ //Direita
- irsend.sendNEC(0x2FD9867, 32);
- Serial.println("direita");
- lcd.setCursor(0,1);
- lcd.print(" Direita ");
- acao = 0;
- }
- if (acao == 32){ //Vol +
- irsend.sendNEC(0x2FD58A7, 32);
- Serial.println("vol");
- lcd.setCursor(0,1);
- lcd.print(" Volume + ");
- acao = 0;
- }
- if (acao == 33){ //vol -
- irsend.sendNEC(0x2FD7887, 32);
- Serial.println("vol");
- lcd.setCursor(0,1);
- lcd.print(" Volume - ");
- acao = 0;
- }
- if (acao == 34){ //Exit
- irsend.sendNEC(0x2FD1AE5, 32);
- Serial.println("exit");
- lcd.setCursor(0,1);
- lcd.print(" Exit ");
- acao = 0;
- }
- if (acao == 35){ //Voltar
- irsend.sendNEC(0xFF00FF, 32);
- Serial.println("voltar");
- lcd.setCursor(0,1);
- lcd.print(" Voltar ");
- acao = 0;
- }
- if (acao == 36){ //mute
- irsend.sendNEC(0x2FD08F7, 32);
- Serial.println("mute");
- lcd.setCursor(0,1);
- lcd.print(" Mudo ");
- acao = 0;
- }
- if (acao == 37){ //sleep
- irsend.sendNEC(0x2FDA857, 32);
- Serial.println("Sleep");
- lcd.setCursor(0,1);
- lcd.print(" Sleep ");
- acao = 0;
- }
- if (acao == 38){ //netflix
- irsend.sendNEC(0x2FD54AB, 32);
- Serial.println("netfix");
- lcd.setCursor(0,1);
- lcd.print(" Netflix ");
- acao = 0;
- }
- if (acao == 39){ //enter
- irsend.sendNEC(0x2FD916E, 32);
- Serial.println("enter");
- lcd.setCursor(0,1);
- lcd.print(" Enter ");
- acao = 0;
- }
- /// Home
- if (acao == 40){ //ligar
- irsend.sendRaw(S_pwr, 67, 38);
- Serial.println("home");
- lcd.setCursor(0,1);
- lcd.print(" Home Theather ");
- acao = 0;
- }
- if (acao == 41){ //funçao
- irsend.sendRaw(S_fca, 67, 38);
- Serial.println("funcao");
- lcd.setCursor(0,1);
- lcd.print(" Funcao ");
- acao = 0;
- }
- if (acao == 42){ //vol -
- irsend.sendRaw(S_vol, 67, 38);
- Serial.println("vol");
- lcd.setCursor(0,1);
- lcd.print(" Volume - ");
- acao = 0;
- }
- if (acao == 43){ //vol +
- irsend.sendRaw(S_volm, 67, 38);
- Serial.println("vol");
- lcd.setCursor(0,1);
- lcd.print(" Volume + ");
- acao = 0;
- }
- if (acao == 44){ //anterior
- irsend.sendRaw(S_ant, 67, 38);
- acao = 0;
- }
- if (acao == 45){ //avançar
- irsend.sendRaw(S_ava, 67, 38);
- Serial.println("anterior");
- lcd.setCursor(0,1);
- lcd.print(" Anterior ");
- acao = 0;
- }
- if (acao == 46){ //play
- irsend.sendRaw(S_pla, 67, 38);
- Serial.println("play");
- lcd.setCursor(0,1);
- lcd.print(" Play ");
- acao = 0;
- }
- if (acao == 47){ //cima
- irsend.sendRaw(S_cim, 67, 38);
- Serial.println("cima");
- lcd.setCursor(0,1);
- lcd.print(" Cima ");
- acao = 0;
- }
- if (acao == 48){ //baixo
- irsend.sendRaw(S_bai, 67, 38);
- Serial.println("baixo");
- lcd.setCursor(0,1);
- lcd.print(" Baixo ");
- acao = 0;
- }
- //Ar condicionado
- if (acao == 49){ //ligar
- irsend.sendRaw(lig_ar, 59, 38);
- Serial.println("ar");
- lcd.setCursor(0,1);
- lcd.print(" Ar Ligado ");
- acao = 0;
- }
- if (acao == 50){ //desligar
- irsend.sendRaw(des_ar, 59, 38);
- Serial.println("ar");
- lcd.setCursor(0,1);
- lcd.print(" AR Desligado ");
- acao = 0;
- }
- if (acao == 51){ //modo
- irsend.sendRaw(modo_ar, 59, 38);
- Serial.println("modo");
- lcd.setCursor(0,1);
- lcd.print(" Modo ");
- acao = 0;
- }
- if (acao == 52){ //velocidade
- irsend.sendRaw(velocidade_ar, 61, 38);
- Serial.println("velocidade");
- lcd.setCursor(0,1);
- lcd.print(" Velocidade ");
- acao = 0;
- }
- if (acao == 53){ //mais Ar
- irsend.sendRaw(aumenta_ar, 59, 38);
- Serial.println("netfix");
- lcd.setCursor(0,1);
- lcd.print(" Ar + ");
- acao = 0;
- }
- if (acao == 54){ //menos ar
- irsend.sendRaw(diminui_ar, 59, 38);
- irsend.sendRaw(aumenta_ar, 59, 38);
- Serial.println("netfix");
- lcd.setCursor(0,1);
- lcd.print(" Ar - ");
- acao = 0;
- }
- // Fita Led
- if (acao ==56){ // liga Fita Led
- irsend.sendNEC(0xFF02FD, 32);
- irsend.sendRaw(aumenta_ar, 59, 38);
- Serial.println("led");
- lcd.setCursor(0,1);
- lcd.print(" Fita de Led ");
- acao = 0;
- }
- if (acao ==57){ //aumentaFita Led
- irsend.sendNEC(0xFF3AC5, 32);
- irsend.sendRaw(aumenta_ar, 59, 38);
- Serial.println("brilho");
- lcd.setCursor(0,1);
- lcd.print(" Brilho +");
- acao = 0;
- ;
- }
- if (acao ==58){ // diminii Fita Led
- irsend.sendNEC(0xFFBA45, 32);
- Serial.println("brilho");
- lcd.setCursor(0,1);
- lcd.print(" Brilho - ");
- acao = 0;
- }
- if (acao ==59){ // azul Fita Led
- irsend.sendNEC(0xFF1AE5, 32);
- Serial.println("azul");
- lcd.setCursor(0,1);
- lcd.print(" Azul ");
- acao = 0;
- }
- if (acao ==60){ // vermelho Fita Led
- irsend.sendNEC(0xFF9A65, 32);
- Serial.println("ver");
- lcd.setCursor(0,1);
- lcd.print(" Vermelho ");
- acao = 0;
- }
- if (acao ==61){ // verde Fita Led
- irsend.sendNEC(0xFFA25D, 32);
- Serial.println("verde");
- lcd.setCursor(0,1);
- lcd.print(" Verde ");
- acao = 0;
- }
- if (acao ==62){ // branco Fita Led
- irsend.sendNEC(0xFF22DD, 32);
- Serial.println("branco");
- lcd.setCursor(0,1);
- lcd.print(" Branco ");
- acao = 0;
- }
- if (acao ==63){ // flash Fita Led
- irsend.sendNEC(0xFFD02F, 32);
- Serial.println("flash");
- lcd.setCursor(0,1);
- lcd.print(" Flash ");
- acao = 0;
- }
- if (acao ==64){ // efeito 1 Fita Led
- irsend.sendNEC(0xFF20DF, 32);
- Serial.println("E1");
- lcd.setCursor(0,1);
- lcd.print(" Efeito 1 ");
- acao = 0;
- }
- if (acao ==65){ // efeito 2 Fita Led
- irsend.sendNEC(0xFFA05F, 32);
- Serial.println("E2");
- lcd.setCursor(0,1);
- lcd.print(" Efeito 2 ");
- acao = 0;
- }
- if (acao ==66){ // efeito 3 Fita Led
- irsend.sendNEC(0xFF609F, 32);
- Serial.println("E3");
- lcd.setCursor(0,1);
- lcd.print(" Efeito 3 ");
- acao = 0;
- }
- if (acao ==67){ // efeito 4 Fita Led
- irsend.sendNEC(0xFFE01F, 32);
- Serial.println("E4");
- lcd.setCursor(0,1);
- lcd.print(" Efeito 4 ");
- acao = 0;
- }
- if (acao ==68){ // Slow Fita Led
- irsend.sendNEC(0xFFC837, 32);
- Serial.println("Slow");
- lcd.setCursor(0,1);
- lcd.print(" Slow ");
- acao = 0;
- }
- if (acao ==69){ // Quick Fita Led
- irsend.sendNEC(0xFFE817, 32);
- Serial.println("Quick");
- lcd.setCursor(0,1);
- lcd.print(" Quick ");
- acao = 0;
- }
- ///////
- } //Final do Cliente conectado
- irrecv.enableIRIn();
- client.stop();
- } //Final do if client
- }
- }
- //LOOP
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement