Universal remote using ir emmiter

Hi guys i recently purchased a set of 10 ir emmiters and receivers with the plan to make a universal remote but i cant figure out how to change the ir signal that it emmits and dont know if thats even posible? thanks in advance:)

heres the link to what i bought Amazon.com: Gikfun Infrared Diode Led IR Emission and Receiver for Arduino (Pack of 10 Pairs) EK8460 : Electronics

Use the irremote.h library. If you install that it comes with example sketches. It's not clear whether you want to build just an IR remote, or if you also want to do some receiving of IR remote signals. Your 3 pin devices are receivers, the 2 pin devices are transmitters. There's plenty of examples of how to wire these up if you search on line. If you have more specific questions post them here

thanks my goal is to make it recieve an signal from another remote and when i press a button it asigns the certain hex code to that button so when i press it the emitter sends that signal. Ps idk if im making any sense at all.

The data sheet is here. It uses a 38KHz modulation frequency.
https://www.sivago.com.cn/upload/pdf/2022/VS1838B.pdf

I think you are saying you want to build a remote that can learn, and remember, codes from other remotes. Then it can send the codes it has learned. You have the parts to do that using, what you bought, plus almost any Arduino board. Start by wiring up a receiver, with one of the example sketches from the library that prints what it receives to the serial monitor.

so wait im kinda new to arduino how to i find example sketchs?

After installing the IRremote library, there will be examples like this:


I'm using an old version of the IDE. If you are using IDE 2.x.y then the UI may differ from my screen shot, but you should still be able to find the examples in a similar way

This is how I wired mine:

Assuming the datasheet in post#4 is for the receivers that you have, then the pin out should be the same as the one I used. This screen snip is from that datasheet:


[Edit: this is a reply to post#8 which I read, but it had been deleted by the time I posted this reply]

maybe worth having a look at the ESP32 RMT - see Remote Control Transceiver

1 Like

hey sorry i deleted that i was trying to ask ai and figured that i dont need 2 solutions but this is way better tysm

When you get the receive demo working if you point a remote at your receiver and press a button on the remote, then you should see some output on the serial monitor.
If you can't get it working, or don't understand the output then come back and post your questions here.
If it's working okay and you understand the output, then the next step would be to use the transmit example, configured to send one of the codes you received and check that your Arduino can successfully send a code to your remotely controlled device.
When you've got that working, you will be in a position to think about how to combine the two to make a universal learning remote. Or you could just manually record (write down) the codes you want your home made remote to send so as your remote can emulate your existing remote(s). Maybe it doesn't need to have a learning mode

so i am trying to read the codes from my ir remote but the whatever button i press it does nothing but randomly it just prints a seemingly random code

heres the code im using

#include <IRremote.h>
#include <ir_Lego_PF_BitStreamEncoder.h>

const int RECV_PIN = 11; // Connect your IR receiver's OUT to pin 11
IRrecv irrecv(RECV_PIN);
decode_results results;

void setup() {
Serial.begin(9600);
irrecv.enableIRIn(); // Start the receiver
}

void loop() {
if (irrecv.decode(&results)) {
Serial.print("IR Code: ");
Serial.println(results.value, HEX); // Print code in hexadecimal
irrecv.resume(); // Receive the next value
}
}

Please post your code in "code tags", by using this button:
image
Before doing that, ensure the code is correctly formatted. You can format your code in the IDE using this option:


Your code expects the output pin of the IR receiver to be on pin 11

Hopefully you didn't wire it to pin 2 as shown in the image of how I wired it up. If you did wire it to pin 2 then change the code to use 2 rather than 11.
If you want further help, please post an image of how you connected the receiver to your Arduino. The picture will need to clearly show which pins of the receiver are connected to which sockets on the Arduino.
[Edit: Why are you including ir_Lego_PF_BitStreamEncoder.h?. You should only need to include IRremote.h. It's possible that including the Lego file is interfering with the correct operation of IRremote.h.]

k so i was not checking this for a while (sorry) but i have wired the receiver corectly and its still not receiving signals from my ir remote that comes with the base starter kit also can it receive signals from other remotes as well as the one included in the starter kit?

So recently i picked up some ir receivers and was wondering how to make them emmit signal (idrk what its called) and i am having trouble figuring that out

my goal is to make a universal remote that can learn codes from other remotes remember them and emmit that same code.

If you've google on your internets over there, add Arduino to anything and marvel:

arduino universal ir remote

HTH

a7

wait wut

That makes sense !

do NOT emit. You will need an IR LED as well.
Just google IR remote, there are hundreds of examples.

to verify that an IR source is emitting, look at it with a CCD camera. CMOS cameras do not work. it is easier to see an 850 nm LED ( dim red glow) than a 940 NM LED ( no visible glow )

cell phone cameras are typically MOS, surveillance cameras are usually CCD.