Transmit IR codes

Hi:

Is it possible to transmit IR codes as if using a remote control, using just an IR emitter? Is there any library that can send words or numbers or anything through an IR emitter?

Thanks

Sure... Here is one way...

See 'examples' here:

wzaggle:
Sure... Here is one way...

But a remote is used here, and they send predefined codes for each button. What if I want to say "hello" to an IR receiver?

Did you check in the examples I linked to?

.

rva1945:
But a remote is used here, and they send predefined codes for each button. What if I want to say "hello" to an IR receiver?

Here is a good tutorial;
https://learn.sparkfun.com/tutorials/ir-communication
Yes tutorial is using remotes but;
"Now, if you point the LED at your appliance and hit the push button that is connected to your Arduino, the code for the button press on your remote will be sent. Once you know which codes correspond to each button, you can create your own remote with the Arduino and IR LED".
So the tutorial is teaching you how to get an Arduino to both receive and send IR codes. Once you can do that you can get an Arduino IR transmitter to send codes to an Arduino IR receiver. What the codes "mean" is then entirely up to you, a given code might mean "hello" or "switch on the light" or "close the blinds".

You are probably over thinking this project.
Create look up tables for converting receive codes to the ASCII.
Here is one example:

//Landscape keypad definitions for the 44 button IR remote
#ifndef Portrait
const byte buttonCode[44] = {
  0x4,0x8,0xC,0x10,0x14,0x18,0x1C,0x50,0x54,0x58,0x5C,
  0x5,0x9,0xD,0x11,0x15,0x19,0x1D,0x51,0x55,0x59,0x5D,
  0x6,0xA,0xE,0x12,0x16,0x1A,0x1E,0x4D,0x49,0x45,0x41,
  0x7,0xB,0xF,0x13,0x17,0x1B,0x1F,0x4C,0x48,0x44,0x40
}; //END of buttonCode Array

const byte ASCIIcode[44] = {
  // 1    2    3    4    5    6    7    8    9    0    -  
  0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x30,0x2D,
  // Q    W    E    R    T    Y    U    I    O    P    ^
  0x51,0x57,0x45,0x52,0x54,0x59,0x55,0x49,0x4F,0x50,0x5E,
  //Shift A    S    D    F    G    H    J    K    L    v
  0xFC,0x41,0x53,0x44,0x46,0x47,0x48,0x4A,0x4B,0x4C,0x76,
  //NL    Z    X    C    V    B   SP   N   M     <    >    
  0x0A,0x5A,0x58,0x43,0x56,0x42,0x20,0x4E,0x4D,0x3C,0x3E
}; //END of ASCIIcode Array 
#endif

In this example, if you determine the RX code was buttonCode[11] or 0x5,
this corresponds to ASCIIcode[11] which converts to 0x51 or the letter Q.

rva1945:
Hi:

Is it possible to transmit IR codes as if using a remote control, using just an IR emitter? Is there any library that can send words or numbers or anything through an IR emitter?

Thanks

See attached zip file - it's a complete IR remote transmitter. Simply modify the codes to be transmitted to your own needs.

ir.zip (5.26 KB)