I Built This Autonomous Robot to Detect and Avoid Obstacles. The Code is Included.

This is a simple autonomous robot able to detect and avoid obstacles. I use a cheap 4WD robot platform (You can use any of these platforms), an Arduino UNO($18.59 on Amazon), and a cheap HC-SR04 sensor (2 pieces at $2.83 on Amazon).

The robot is programmed to drive forward till an obstacle is detected. Then it turns the sensor left and right. Compare the values returned by the ultrasonic sensor and take a decision.

This is the Arduino code:

And this is how the robot navigates autonomously in my kitchen:

 

Leave a Comment

Your email address will not be published. Required fields are marked *