Uploaded December 2022 | Updated September 2026, 1 week ago
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.
Purchase this kit from SunFounder website robojax.com/L/?id=367
This lecture is part of Robojax Arduino Course based on SunFounder kit with lesson 1 starts here: bit.ly/sunfouder
The best thank you for me is to not to skip ads and Subscribe 🔔 to my channel, like 👍 the video It is greatly appreciated. 🔔 😊.
I will reply to all Subscriber's 🔔 questions. So make sure to Subscribe.😊 .
**** Purchase this SunFounder Arduino Learning kit from Affiliated Stores ***
Amazon USA:amzn.to/3iAYIh7
Amazon Canada:amzn.to/3Fm76cV
Amazon Germany :amzn.to/3UtVOYG
Amazon UK: amzn.to/3VuRNV1
Amazon France: amzn.to/3iCKfko
Amazon Spain: amzn.to/3Vu7uvA
Amazon Italy: amzn.to/3EYGu0v
Amazon Japan: amzn.to/3h0nbf1
SunFounder website: robojax.com/L/?id=367
eBay: ebay.us/xYb1lT
AliExpress: https://s.click.aliexpress.com/e/_DlS0a0F
Download Arduino Code: docs.sunfounder.com/projects/3in1-kit/en/latest
Use Chapters from timeline or click on the time
00:00 Introduction
1:15 Introduction
2:32 Wiring Explained
4:55 Code explained
8:44 Error in Code (Error 1)
10:08 Error in Code (Error 2)
11:51 Demonstration of project
Tutorial by Ahmad Shamshiri form Canada
If you found this tutorial helpful, please support me so I can continue creating contents like this. Here is PayPal link bit.ly/donate-robojax
Power Supply I use:
DC 30V 60A Power supply: https://s.click.aliexpress.com/e/_98Ah5c
DC 60V 30A Power supply: https://s.click.aliexpress.com/e/_APyPJ0
Follow me on Facebook fb.me/robojaxTV
Follow me on Twitter: twitter.com/robojaxTV
Follow me on Instagram: instagram.com/robojax
Follow me on TikTok : tickTok.com/@robojaxtv
Tutorial by Robojax.com
Get other projects code and learn Arduino
robojax.com
#robojaxArduinoCourse #robojaxSunFounder #robojaxSmartCar
**** AFFILIATE PROGRAM ****
We are a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for us to earn fees by linking to Amazon.com and affiliated sites.
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.
Purchase this kit from SunFounder website robojax.com/L/?id=367
This lecture is part of Robojax Arduino Course based on SunFounder kit with lesson 1 starts here: bit.ly/sunfouder
The best thank you for me is to not to skip ads and Subscribe 🔔 to my channel, like 👍 the video It is greatly appreciated. 🔔 😊.
I will reply to all Subscriber's 🔔 questions. So make sure to Subscribe.😊 .
**** Purchase this SunFounder Arduino Learning kit from Affiliated Stores ***
Amazon USA:amzn.to/3iAYIh7
Amazon Canada:amzn.to/3Fm76cV
Amazon Germany :amzn.to/3UtVOYG
Amazon UK: amzn.to/3VuRNV1
Amazon France: amzn.to/3iCKfko
Amazon Spain: amzn.to/3Vu7uvA
Amazon Italy: amzn.to/3EYGu0v
Amazon Japan: amzn.to/3h0nbf1
SunFounder website: robojax.com/L/?id=367
eBay: ebay.us/xYb1lT
AliExpress: https://s.click.aliexpress.com/e/_DlS0a0F
Download Arduino Code: docs.sunfounder.com/projects/3in1-kit/en/latest
Use Chapters from timeline or click on the time
00:00 Introduction
1:15 Introduction
2:32 Wiring Explained
4:55 Code explained
8:44 Error in Code (Error 1)
10:08 Error in Code (Error 2)
11:51 Demonstration of project
Tutorial by Ahmad Shamshiri form Canada
If you found this tutorial helpful, please support me so I can continue creating contents like this. Here is PayPal link bit.ly/donate-robojax
Power Supply I use:
DC 30V 60A Power supply: https://s.click.aliexpress.com/e/_98Ah5c
DC 60V 30A Power supply: https://s.click.aliexpress.com/e/_APyPJ0
Follow me on Facebook fb.me/robojaxTV
Follow me on Twitter: twitter.com/robojaxTV
Follow me on Instagram: instagram.com/robojax
Follow me on TikTok : tickTok.com/@robojaxtv
Tutorial by Robojax.com
Get other projects code and learn Arduino
robojax.com
#robojaxArduinoCourse #robojaxSunFounder #robojaxSmartCar
**** AFFILIATE PROGRAM ****
We are a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for us to earn fees by linking to Amazon.com and affiliated sites.










