Hello,
I am trying to make a system where I can control my TV using an IR LED with an arduino nano or uno. I have been able to get my TV to turn off and on, as well as a few other function that are related to the TV specifically. However, I can't find out how to control the cable (channels) with the LED. When I try to find out the manufacturer (so I know which "send__()" to use), I am getting responses of "unknown". This is the code I am using:
#include <IRremote.h>
// Define sensor pin
const int RECV_PIN = 4;
// Define IR Receiver and Results Objects
IRrecv irrecv(RECV_PIN);
decode_results results;
void setup(){
// Serial Monitor @ 9600 baud
Serial.begin(9600);
// Enable the IR Receiver
irrecv.enableIRIn();
}
void loop(){
if (irrecv.decode(&results)){
Serial.println(results.value, HEX);
switch (results.decode_type){
case NEC:
Serial.println("NEC");
break;
case SONY:
Serial.println("SONY");
break;
case RC5:
Serial.println("RC5");
break;
case RC6:
Serial.println("RC6");
break;
//case DISH:
// Serial.println("DISH");
break;
case SHARP:
Serial.println("SHARP");
break;
case JVC:
Serial.println("JVC");
break;
//case SANYO:
// Serial.println("SANYO");
break;
//case MITSUBISHI:
// Serial.println("MITSUBISHI");
break;
case SAMSUNG:
Serial.println("SAMSUNG");
break;
case LG:
Serial.println("LG");
break;
case WHYNTER:
Serial.println("WHYNTER");
break;
//case AIWA_RC_T501:
// Serial.println("AIWA_RC_T501");
break;
case PANASONIC:
Serial.println("PANASONIC");
break;
case DENON:
Serial.println("DENON");
break;
default:
case UNKNOWN:
Serial.println("UNKNOWN");
break;
}
irrecv.resume();
}
}
(note this is not my code, I have modified it from something I found online).
When I hit any buttons that control my cable, I get strange responses in the serial monitor. I get things like this:
37910D
UNKNOWN
FFFFFFFF
UNKNOWN
37111D
UNKNOWN
FFFFFFFF
UNKNOWN
Is there any way I can still control the cable of the TV with the LED? I read that you can send values raw, but I didn't understand how I do this. For example, the TV which is sony needs each signal to be modulated three times. How would I know if something similar needs to be done with my cable? If you have any ideas on how I could send the signal, or on other ways I could control the cable with an ir LED, I would love to hear them.
Thanks in advance.