Final Milestone
I did this in a few steps the first thing I did was get an ultrasonic sensor so that when the autonomous robot moves on its own it can sense that there is an object in front of it. With the code I was able to tell it when it comes it a certain vicinity it should scan left and right and change its path by either going backward, forward, left, or right.
The ultrasonic sensor only senses objects, so to make it move left and right to scan its surroundings, you have to put it on a servo motor. A servo motor is basically a regular motor that moves 180 degrees instead of 360. In my code, I told the servo to scan side to side before sending a message to the DC motors that power the actual tank.
The ultrasonic sensor didn’t fit on the servo motor so I 3D printed a mount that would let the sensor move along with the servo and let them work as one body. I really enjoyed this part of the project because I took control of what I wanted my robot to do.
I not only did that but I also built a case out of plexiglass. At first, it was difficult because I had to use a hand saw and sawing plexiglass was difficult because it was so fragile. I designed my box using TinkerCAD and I really enjoyed experimenting with everything in my project.
Second Milestone
First Milestone
Distance Alarm