Instructions

IDUINO for maker’s life
www.openplatform.cc 25
controller, BS2 controller, attached to the robot that
Can sense changes in their surroundings.
Specification:
Working voltage: DC 3.3V-5V
Working current: 20mA
Operating temperature: -10 - +50
detection distance :2-40cm
IO Interface: 4-wire interfaces (- / + / S / EN)
Output signal: TTL level (low level there is an obstacle, no obstacle high)
Adjustment: adjust multi-turn resistance
Effective angle: 35 °
Size: 45mm × 23mm
2. Pinout
Pin
Description
“+”
Power(3.3V~5V DC)
Gnd
ground
out
Signal pin
EN
Enable pin that Low level works, usually
useless
3.Example code
Here is a small example to test the sensor. By default, the sensor returns 1 on the Serial
Monitor. When detecting something, the sensor return 0.
The connection as below: