o objetivo dos codigos é acender leds atraves de um controle remoto, porem eu nao consigo fazer com que os leds acendam, o codigo abaixo é oque estou usando no momento, podem me dizer oque esta errado
#include <IRremote.hpp>
#include <IRremote.h>
#define SUPPRESS_ERROR_MESSAGE_FOR_BEGINem IRRemote.h
#define IR_RECEIVE_PIN 2
int PinVermelho = 12;
int PinVerde = 11;
int PinBranco = 10;
int PinAzul = 9;
int PinLaranja = 8;
int PinAmarelo = 7;
void setup()
{
IrReceiver.begin(IR_RECEIVE_PIN, ENABLE_LED_FEEDBACK);
pinMode(PinVermelho, OUTPUT);
pinMode(PinVerde, OUTPUT);
pinMode(PinBranco, OUTPUT);
pinMode(PinAzul, OUTPUT);
pinMode(PinLaranja, OUTPUT);
pinMode(PinAmarelo, OUTPUT);
Serial.begin(9600);
}
void loop(){
if (IrReceiver.decode()){
Serial.println(IrReceiver.decodedIRData.decodedRawData, HEX); // Print “old” raw data
char valor =IrReceiver.decodedIRData.decodedRawData;
IrReceiver.resume();
}
if( IrReceiver.decodedIRData.decodedRawData == EF10BF00){ //botao 1
digitalWrite(PinVerde, HIGH);
digitalWrite(PinVermelho,LOW);
digitalWrite(PinBranco, LOW);
digitalWrite(PinAzul, LOW);
digitalWrite(PinLaranja, LOW);
digitalWrite(PinAmarelo, LOW);
}else if ( IrReceiver.decodedIRData.decodedRawData == 0xFD8877){ //botao 2
digitalWrite(PinVerde, LOW);
digitalWrite(PinVermelho,HIGH);
digitalWrite(PinBranco, LOW);
digitalWrite(PinAzul, LOW);
digitalWrite(PinLaranja, LOW);
digitalWrite(PinAmarelo, LOW);
}else if ( IrReceiver.decodedIRData.decodedRawData== 0xFD48B7){ //botao 3
digitalWrite(PinVerde, LOW);
digitalWrite(PinVermelho, LOW);
digitalWrite(PinBranco, HIGH);
digitalWrite(PinAzul, LOW);
digitalWrite(PinLaranja, LOW);
digitalWrite(PinAmarelo, LOW);
}else if ( IrReceiver.decodedIRData.decodedRawData== 0xFD28D7){ //botao 4
digitalWrite(PinVerde, LOW);
digitalWrite(PinVermelho, LOW);
digitalWrite(PinBranco, LOW);
digitalWrite(PinAzul, HIGH);
digitalWrite(PinLaranja, LOW);
digitalWrite(PinAmarelo, LOW);
}else if ( IrReceiver.decodedIRData.decodedRawData== 0xFDA857){ //botao 5
digitalWrite(PinVerde, LOW);
digitalWrite(PinVermelho, LOW);
digitalWrite(PinBranco, LOW);
digitalWrite(PinAzul, LOW);
digitalWrite(PinLaranja, HIGH);
digitalWrite(PinAmarelo, LOW);
}else if ( IrReceiver.decodedIRData.decodedRawData== 0xFD6897){ //botao 6
digitalWrite(PinVerde, LOW);
digitalWrite(PinVermelho, LOW);
digitalWrite(PinBranco, LOW);
digitalWrite(PinAzul, LOW);
digitalWrite(PinLaranja, LOW);
digitalWrite(PinAmarelo, HIGH);
}
}