How to send IR codes?

I’m working on a project with an IR remote, i was able to ‘receive’ it, but all my attempts to ‘send’ IR codes failed. here are a few photos of the hardware, followed by the code:





#include <IRremote.h>
#include <LiquidCrystal.h>
int led = 9;
LiquidCrystal lcd(12, 13, 5, 4, 3, 2);
int Joppe = 0;

IRrecv irrecv(11); // Receive on pin 11
IRsend irsend;
decode_results results;

main () {
setup ();
Serial.println (“hallo”);

while (1) {
loop ();
}
}

void setup()
{
lcd.begin(16, 2);

Serial.begin(9600);
pinMode(led, OUTPUT);
irrecv.enableIRIn(); // Start the receiver
digitalWrite(led, LOW);

}

void loop() {

if (Serial.read() != -1) {
for (int i = 0; i < 3; i++) {
irsend.sendSony(0xa90, 12); // Sony TV power code
delay(100);
}
}
if (irrecv.decode(&results)) {
Serial.println(results.value, HEX);
irrecv.resume(); // Continue receiving

if (results.value == 0XFF30CF){
lcd.print(“1”);
}
if (results.value == 0XFF18E7){
lcd.print(“2”);
}
if (results.value == 0XFF7A85){
lcd.print(“3”);
}
if (results.value == 0XFF10EF){
lcd.print(“4”);
}
if (results.value == 0XFF38C7){
lcd.print(“5”);
}
if (results.value == 0XFF5AA5){
lcd.print(“6”);
}
if (results.value == 0XFF42BD){
lcd.print(“7”);
}
if (results.value == 0XFF4AB5){
lcd.print(“8”);
}
if (results.value == 0XFF52AD){
lcd.print(“9”);
}
if (results.value == 0XFFE21D){
lcd.clear();
}

if (results.value == 0XFFA25D){

if (Joppe == 0){
digitalWrite(led, HIGH);
Joppe = 1;
}
else
{
digitalWrite(led, LOW);
Joppe = 0;

}

}
}

}

IRremote.ino (1.48 KB)