I’m making a robot for school program, I am new to robotics so I’ve decided to use a code from the internet. Unfortunate the robot is only going forward, while it’s supposed to avoid obstacles, using the distance sensor.
and the code:
I’ve tried editing the pins for the ultrasonic sensor to see if it will work, just in case if you are wondering why the pins are connected to 0 and 1 (it is 2 and 3 in the code).
The wires on the left are positive and negative, because I am using a smaller breadboard.