Trying to get IR receiver to detect an IR emitter

Hi

I’m trying to get my “KY-022 INFRARED RECEIVER” to detect my “KY-005 INFRARED TRANSMITTER” , and I’m trying to get it to display that it is detecting it on my serial monitor. This is for a project. When I digital read the receiver pin, it reads as high meaning that it isn’t detecting anything. I think I need to PWM the transmitter but im not sure exactly how or what frequency.

ir pic.PNG

Here is a page that explains the basics of IR communication.

The KY-005 is just an IR LED. You need to add a resistor (150 Ohm minimum) to avoid burning out your port pin. Have you done that?

Have you wired the IR receiver properly?

The code you posted improperly (as an image), doesn't do anything useful. See the link in reply #1 for the basics.

Once you have some basic understanding, and have tried again, let us know how you get on.

If you continue to have difficulties, please read the "How to use this forum" post and post your code properly, using code tags, and a wiring diagram.

all im missing is how to PWN at 38Khz, there are absolutely no tutorials online of how to do so without using a library, which im trying to avoid

You can use tone() for that.

there are absolutely no tutorials online of how to do so without using a library

Utter nonsense.

https://www.gammon.com.au/timers

jasondumond:
without using a library, which im trying to avoid

What's your aversion to using a library? Other than an academic exercise to prove to yourself or a teacher that you can roll your own, it seems crazy to me not to put some others' efforts to good use.

What's your aversion to using a library?

Presumably just being irrational, similar to making silly statements like "there are absolutely no tutorials...".

jasondumond:
all im missing is how to PWN at 38Khz, there are absolutely no tutorials online of how to do so without using a library, which im trying to avoid

see post #12 here for an elegant solution