Arduino NANO + MaxSonar

Ultrasonic Range Sensor

Photo

I2C protocol5 volts

Sensors are an important component of building a robot. Knowing the distance to an obstacle in front of the robot is extremely useful. For example to avoid a collision. An electronic compass and GPS is not sufficient to avoid a collision. I have thus experimented with several distance proximity sensors.

The Arduino NANO used A1.

Fritzing

Copy/Paste Sketch