I have an Elegoo MEGA controller board. I am trying to start developing an idea that uses lasers and receivers, so I wanted to test the basics of ir transmitting and receiving with my Arduino kit. I tried both of the following links and followed them to a T and neither of them seem to work:
Right now I'm dealing with the second, simpler setup and it's not working so I'll try to trouble shoot using this one. As I read the output, the only way I can get the reading to change to 0 is if I disconnect the 5v jumper from the VCC pin on the IR receiver. I can disconnect both of the other jumpers with only the 5v pin connected to the vcc on the receiver and the readings continue to output 1. This same thing happens with two different IR receivers I am using. It also doesn't change anything if I hold the receiver in my closed hand to block all light: the serial monitor continues to read 1.Does this mean there is a problem with my board?
Such a project has software and hardware. So there are many things possible that can cause malfunction.
If you have one of these longe rbreadboards the longside rails for power-supply are interrupted in the middle
You will have to provide more information to find the real cause.
Post exact that sketch that you uploaded into your Arduino Mega board.
Post a hand-drawn schematic how you connected the receiver-module.
Post a high resolution picture taken from vertically above to make it easy to see what jumperwire is connected to what.
As a simple pretest. Measure the voltage between ground and Vcc.
Measure the voltage between ground and the output-pin of the receiver-module with a digital multimeter.
If you do not have one yet. a digital multimeter is a must when tinkering with microcontrollers.
I was moving to upload the pictures I took for you when I saw kmin's comment. I realized I was trying two different IR receivers. Once I actually tried an LDR it worked. Thank you for your response and help!