Ir receiver doesn't receive right code !

Greetings my fellow programmer,

I'm trying to send Sony Ir codes from on Arduino to another. For some reason the receiver doesn't receive the right code.

My Codes

Fixed

Problem

Received signals from the remote control and the transmitter are different

Have a good day!

Lizraya

How are you connecting the two Arduinos?

I used Infared but everything was working fine but i iterpreted it wrong

Got an new problem now! >:(

section in code

fixed

}

What it does:

Prints my input but also Ÿ's every few seconds when i didn't wrote anything.

What I want it to do

Only print my input.

Fixed it pretty much by accident!!!

Prints my input but also Ÿ's every few seconds when i didn't wrote anything.

Ÿ is what you get when you try and read the serial buffer and there is nothing in it to read.