hello friends:
i try to send signal infra red to my tv but not work.
i have already all codecs of RF os my tv but it is not nec o sony its "unknow".
when i put all those codecs in the code for send to tv not work.
i dont know if is because the codecs os RF its wrong o the code to send arduino its wrong.
this its the code i use for send singnal to tv:
#include <boarddefs.h>
#include <IRremote.h>
#include <IRremoteInt.h>
#include <ir_Lego_PF_BitStreamEncoder.h>
#include "IRremote.h"
int intByte;
IRsend irsend;
int RECV_PIN = 11;
IRrecv irrecv(RECV_PIN);
decode_results results;
//YES remote control definition
const long ONE = 0xD41;
const long TWO = 0x213C946B;
const long THREE = 0x213C9C63;
const long FOUR = 0x213C14EB;
const long FIVE = 0x213C04FB;
const long SIX = 0x213C1CE3;
const long SEVEN = 0x213C4CB3;
const long EIGHT = 0x213C54AB;
const long NINE = 0x213C44BB;
const long ZERO = 0x213CCC33;
const long POWER = 0x213C847B;
const long YES_BUTTON = 0x213CC43B;
const long BACK = 0x213C5CA3;
const long INFO = 0x213C3CC3;
const long CHANNEL_UP = 0x213CAC53;
const long CHANNEL_DOWN = 0x213CEC13;
const long MUTE = 0xD; //TV mute
const long VOL_UP = 0x10; //TV volume up
const long VOL_DOWN = 0x11; //TV volume up
void setup()
{
Serial.begin(9600);
pinMode(13, OUTPUT);
}
void loop()
{
if (Serial.available()>0)
{
intByte = Serial.read();
if (intByte >47 && intByte<58)
{
//Serial.print("channel ");
intByte = intByte-48;
//Serial.println(intByte, DEC);
if (intByte == 1){ irsend.sendNEC(ONE, 32); }
if (intByte == 2){ irsend.sendNEC(TWO, 32); }
if (intByte == 3){ irsend.sendNEC(THREE, 32); }
if (intByte == 4){ irsend.sendNEC(FOUR, 32); }
if (intByte == 5){ irsend.sendNEC(FIVE, 32); }
if (intByte == 6){ irsend.sendNEC(SIX, 32); }
if (intByte == 7){ irsend.sendNEC(SEVEN, 32); }
if (intByte == 8){ irsend.sendNEC(EIGHT, 32); }
if (intByte == 9){ irsend.sendNEC(NINE, 32); }
if (intByte == 0){ irsend.sendNEC(ZERO, 32); }
blinkLED(1);
delay(210);
}
else
{
if (intByte==80){ irsend.sendNEC(POWER, 32);} //power command
if (intByte==73) {irsend.sendNEC(INFO, 32);} //info command
if (intByte==66) {irsend.sendNEC(BACK, 32);} //back command
if (intByte==89) {irsend.sendNEC(YES_BUTTON, 32);} //yes button command
if (intByte==85) {irsend.sendNEC(CHANNEL_UP, 32);} //up command
if (intByte==68) {irsend.sendNEC(CHANNEL_DOWN, 32);} //down channel command
if (intByte==77) {irsend.sendRC5(MUTE, 12);} //down channel command
if (intByte==43) {irsend.sendRC5(VOL_UP, 12); blinkLED(5);} //down channel command
if (intByte==45) {irsend.sendRC5(VOL_DOWN, 12); blinkLED(4);} //down channel command
}
}
}
void blinkLED(int i)
{
for (i; i>0; i--)
{
//blink LED
digitalWrite(13, HIGH);
delay(100);
digitalWrite(13, LOW);
delay(250);
}
}
the codecs are similar of this:
D41
D63
564
543
D44
D46
574
i think its hexa codecs but i am lost with this.
if someone know how i can make this work or know any tutorial abuout this conection.
thanks very much for help me.