REceive ir and send an other

Hello,

does anyone knows a sketch to receive a remote control code and send a other remote control code.

My Hardware is Arduino Uno . A Notebook with Windows 11 installed and also Arduino Ide 2.3.5

The Ir to send is connect to Pin 3 (anode) ( Digital PWM ) and Ground.

The Ir to receive is connect to Pin 2 and also to 5 Volt and Ground.

Example :

Received Code :

unsigned int raw[26] = {900,850,950,850,1800,850,900,850,950,800,950,850,900,850,950,800,950,850,900,850,950,800,950,1700,900,};

irsend.sendRaw(raw,26,38);

Code to be sending :

unsigned int raw[24] = {900,850,950,800,1850,800,950,850,900,850,950,800,950,1700,1850,850,900,850,950,800,950,1700,850,};

irsend.sendRaw(raw,24,38);

I think it will be something like if ... then ... in a loop.

But im to stupid :-/

Install the latest IRremote library 4.4.1 and use example sketch from there.

You need current limiting resistor in series.