O'Reilly logo

Intelligent IoT Projects in 7 Days by Agus Kurniawan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Detecting obstacles

To move properly, our robot shouldn't be hindered by obstacles. A common solution to detect obstacles is to use an ultrasonic sensor. A sample sensor implementation is HC-SR04. You can get it from SparkFun: https://www.sparkfun.com/products/13959. You can see it here:

The HC-SR04 sensor has four pins: VCC (Power), Trig (Trigger), Echo (Receive), and GND (Ground), which are easy to connect to Arduino and Raspberry Pi.

Another sensor is the IR distance sensor. A sample sensor implementation is the Sharp GP2Y0A21 IR Distance Sensor, https://www.dfrobot.com/product-328.html, from DFRobot. Since I'm using the MiniQ Discovery ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required