Fiz um Código de irremote , compila normalmente só quando vou usar na serial e envia essa mensagem  :

IRsend not implemented for ESP32 yet
IRsend not implemented for ESP32 yet
IRsend not implemented for ESP32 yet
IRsend not implemented for ESP32 yet
IRsend not implemented for ESP32 yet
IRsend not implemented for ESP32 yet
IRsend not implemented for ESP32 yet
IRsend not implemented for ESP32 yet
IRsend not implemented for ESP32 yet
IRsend not implemented for ESP32 yet
IRsend not implemented for ESP32 yet
IRsend not implemented for ESP32 yet
IRsend not implemented for ESP32 yet
IRsend not implemented for ESP32 yet
IRsend not implemented for ESP32 yet
IRsend not implemented for ESP32 yet
IRsend not implemented for ESP32 yet
IRsend not implemented for ESP32 yet
IRsend not implemented for ESP32 yet
IRsend not implemented for ESP32 yet
IRsend not implemented for ESP32 yet
IRsend not implemented for ESP32 yet
IRsend not implemented for ESP32 yet
IRsend not implemented for ESP32 yet
IRsend not implemented for ESP32 yet
IRsend not implemented for ESP32 yet
IRsend not implemented for ESP32 yet
IRsend not implemented for ESP32 yet
IRsend not implemented for ESP32 yet
IRsend not implemented for ESP32 yet
IRsend not implemented for ESP32 yet
IRsend not implemented for ESP32 yet
IRsend not implemented for ESP32 yet
IRsend not implemented for ESP32 yet
IRsend not implemented for ESP32 yet
Comando enviado: Liga / Desliga

Aqui esta o código : 

#include <boarddefs.h>

#include <IRremoteInt.h>
#include <ir_Lego_PF_BitStreamEncoder.h>

#include <IRremote.h>

int send_pin = 17;

IRsend irsend;

int tamanho = 68; //TAMANHO DA LINHA RAW(68 BLOCOS)
int frequencia = 32; //FREQUÊNCIA DO SINAL IR(32KHz)


unsigned int LD[68] = {9050,4450,650,500,600,500,650,450,650,500,650,500,650,500,600,500,650,500,600,1650,600,1650,650,1600,650,1600,650,1600,650,1600,650,1600,650,1650,600,1600,650,1650,600,1650,600,500,650,500,600,500,650,500,650,450,650,500,650,500,600,500,650,1600,650,1650,600,1650,600,1650,600,1600,700}; //COLE A LINHA RAW CORRESPONDENTE DENTRO DAS CHAVES


void setup(){
pinMode(send_pin ,OUTPUT);
Serial.begin(115200); //INICIALIZA A PORTA SERIAL

}

void loop(){

char c = Serial.read(); //VARIÁVEL RESPONSÁVEL POR RECEBER O CARACTER DIGITADO NA JANELA SERIAL

if (c == 'a'){ //SE CARACTER DIGITADO FOR IGUAL A "a", FAZ
irsend.sendRaw(LD,tamanho,frequencia); // PARÂMETROS NECESSÁRIOS PARA ENVIO DO SINAL IR
Serial.println("Comando enviado: Liga / Desliga");
delay(50); // TEMPO(EM MILISEGUNDOS) DE INTERVALO ENTRE UM COMANDO E OUTRO
}
}

Exibições: 183

Responder esta

© 2024   Criado por Marcelo Rodrigues.   Ativado por

Badges  |  Relatar um incidente  |  Termos de serviço