SunFounder 3in1 Kit
Adjust the Module
Before starting the project, you need to adjust the detection distance of the module.
Wiring according to the above diagram, power up the R4 board (either by plugging in the USB cable directly or by
snapping the 9V battery cable), without uploading the code.
Place a notebook or any other flat object about 5cm in front of the IR obstacle avoidance.
Then use a screwdriver to rotate the potentiometer on the module until the signal indicator on the module just lights
up, so as to adjust its maximum detection distance of 5cm.
Follow the same method to adjust another infrared module.
5.6. 5. Play with Obstacle Avoidance Module 245