Hello
Sorry my english, I try recieve ir code from Samsung tv remote and send to amplifier yamaha (Nec code) but my sketch not work, recieve code once and then program is in “loop” and no decode.
What am i doing wrong ? I have Arduino UNO R3.
//tv - "samsung aa59-0038a" amp - yamaha rav16
//tv volume up 0xE0E0E01F
//tv volume down 0XE0E0D02F
//tv off/on 0xE0E040BF
//amp volume up 0x5EA158A7
//amp volume down 0x5EA1D827
//amp off/on 0x5EA1F807
#include <IRremote.h>
#define irPin 11
IRrecv irrecv(irPin);
IRsend irsend;
decode_results results;
void setup() {
Serial.begin(9600);
irrecv.enableIRIn();
irsend.enableIROut(38);
irsend.mark(0);
}
void loop() {
if (irrecv.decode(&results)) {
if(results.value == 0xE0E040BF);
{
Serial.println(results.value, HEX);
irsend.sendNEC(0x5EA1F807, 32);
Serial.println("send off/on");
}
if(results.value == 0xE0E0E01F);
{
Serial.println(results.value, HEX);
irsend.sendNEC(0x5EA158A7, 32);
Serial.println("send volume up");
}
if(results.value == 0xE0E0D02F);
{
Serial.println(results.value, HEX);
irsend.sendNEC(0x5EA1D827, 32);
Serial.println("send volume down");
}
irrecv.resume();
}
}