In my previous instructable, I showed that it is very simple to control DC motors using Arduino Nano compatible controller and Fabric Shield. You can get this robot through my Kickstarter project.

I am going show you how to read the Ultrasonic Distance Sensor and use the measured distance to guide a robot. In this tutorial, the robot moves backward and turns away if it senses something that is too close.

Step 1: Plug in an Ultrasonic Distance Sensor

Please follow my other instructable to connect the motors. In addition, you will need to attach the ultrasonic distance sensor (HC-SR04) to the Fabric Shield. There are female header pins specifically designed to connect to this sensor. See picture attached.

Basically, the "Trig" and "Echo" pins connect to A1 and A0 pins of Arduino Nano respectively.

About This Instructable




More by HackARobot:How to Build a WiFi Thermometer Arduino Robot that avoids human How to control DC motors using Arduino 
Add instructable to: