Object Avoidence Robot
This is a robot which avoids obstacles
Supplies
needs tinkercad (website)
First you need to add 2 components 1 is Breadboard and another Arduino Uno R3
Add a H-Bridge Motor Driver
You can Find it as H-Bridge Motor Driver or L293D
Now u need to add 2 wires . 1 from 5v to the upper +(plus) line and another from GND to -(minus) line and use the GND Which I used
Now only upper lines are getting battery so for the bottom lines to also get battery we need to connect a wire from upper +(plus) to lower +(plus) and from upper -(minus) to lower -(minus)
Even change colors like I have did
From H-Bridge Motor Driver take wires
From Power 1 to +(plus) line
From Enable 3 &4 to +(plus) line
From Enable 1 & 2 to +(plus) line
From Power 2 to +(plus) line
From H-Bridge Motor Driver take wires
From H-Bridge Motor Driver all 4 grounds to - (minus) line
Add 2 motors and align them
Upper motor as Right Motor
Lower Motor as Left Motor
You can find motors as Hobby Geramotor
Now connect right Motor's positive wire to output 3 and negative in output 4
Now also connect left Motor's positive wire to output 1 and negative in output 2
Now you need to connect both upper and lower wires . Upper wires in D8 and D9 . Upper wires in D10 and D12.
Now click on code and code blocks like this
Now add Ultrasonic Distance Sensor from other components
Now VCC Wire from Ultrasonic Distance Sensor in +(plus) row
Now GND Wire from Ultrasonic Distance Sensor in -(minus) row
Now Trigger Wire from Ultrasonic Distance Sensor D7
Now Echo Wire from Ultrasonic Distance Sensor D6
Delete All Blocks
The blocks should be like this and when u add the sign it should be < and in number 5 rest blocks u have seen
Working Video
Steps Complete