IR obstacle sensor sees nothing, or sees everything
- IR sensor
Why it happens
- The sensitivity screw isn't set.
- Bright sunlight.
- Most modules give LOW when they see something, so the code looks backwards.
How to fix it
- Turn the screw until the small LED lights only when your hand is at the distance you want.
- Try indoors, away from windows.
- If it's reversed, change
HIGHtoLOWin the if. - For a line follower keep it 5 to 10 mm above the floor.
It worked if: The module's LED goes on and off as you move a white card.
Related errors
From how the part works. Explained from how the part works; not tried on a real circuit for this page.
Didn't help? Search another error or ask us.

