The Obstacle Avoidance Robot
In this project, I used a website known as TinkerCAD to design the virtual Obstacle Avoidance Robot. This robot calculate the distance between the robot and the obstacle in front of it, and avoids getting in contact with the obstacle by turning (left according to my code). I used the same TinkerCAD website to code.
Supplies
- Arduino
- Breadboard
- L293D (H-bridge motor driver)
- Motors (hobby gear motors)
- Ultrasonic sensor
Connections
Refer the above image to do the wire connections.
Note: Do the wire connections after checking the circuit carefully, because, when I was making the project, I made a small mistake so my whole circuit didn't work.
Code
Refer the above image to code.
Note: Enter the inputs according to your wire connections.