For one part of the Arduino project, we built and connected the ultrasonic distance sensor to the breadboard and Arduino before testing how it worked. We saw that the sensor detects objects by sending out high-frequency sound waves and measuring the time it takes for the echo to return. We also observed that the LED changed colors as a hand or other object moved closer to or farther away from the sensor. This showed us how the sensor can help a robot detect obstacles and navigate its surroundings.
For this part of the Arduino project, we assembled and programmed an autonomous robot by connecting the motors, motor driver, switch, distance sensor, and battery pack and later writing out a code for it. We observed that the robot drove forward until the distance sensor detected an obstacle. When an object was detected, the robot stopped, backed up, turned, and continued moving in a new direction. This showed us how sensors and programming work together to help a robot navigate its surroundings without human control.
We built and programed and Arduino robot that follows lines. The robot uses three IR sensors to detect where it is on the line, then makes a decision to move forward or turn.