Hi, I am trying to use a pololu-2578 IR sensor with my rpi 4b, but when connected and enabled, the sensor only outputs the default value, which is 0. It doesn’t change even if there’s something in front of it. Can someone please help?
The OUT pin on the item #2578 IR proximity sensor is high by default when it is not detecting an object, and it is low when it does detect an object. So, it sounds like your sensor is always detecting something, connected incorrectly, or not being powered.
Can you post some pictures of your setup with the that show how everything is connected, including close-ups of the solder joints? Could you also tell me what the board’s green and red LEDs are doing when you try to use the sensor?
The problem seems to have fixed itself. I did literally the exact same things i did before but now it works fine. Sorry for the inconvenience.
I am glad to hear that it is working now, though that type of behavior (problems seemingly appearing then disappearing for no apparent reason) is commonly the result of bad or intermittent connections somewhere in the setup. You might consider checking that all your wires are making tight connections and that the soldering on your board looks okay. The Adafruit Guide to Excellent Soldering would be a good reference to check the soldering against.