Lesson 26/31: Smart Car Part 4 : Avoiding Obstacle Using Ultrasonic Sensor | SunFounder Robojax
In this lesson, the fourth in our Smart Car series, we will integrate and utilize an Ultrasonic Sensor in our project. This sensor will enable our smart car to measure distances to objects. We will program the car's behavior based on these measurements: if the detected distance is greater than 25cm, the car will move forward; if it's between 2cm and 10cm, the car will move backward; and if the distance is less than 25cm, the car will come to a stop. We will identify and explain two common errors encountered in the code for this application. Furthermore, the wiring connections and the complete code will be thoroughly explained. Finally, the fully functional project will be demonstrated, showcasing the smart car's ability to react to varying distances.
Common Course Links
Common Course Files
자원 및 참고자료
아직 자원이 없습니다.
파일📁
아두이노 라이브러리 (zip)
-
SunFounder's 3-in-1 Smart Car learning kit source code
3in1-kit-main-v2.zip12.80 MB