EasyManua.ls Logo

Keyestudio ESP32 - 5. Test Result; 6. Code Explanation; Project 27: Intelligent Parking; 1. Description

Keyestudio ESP32
344 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
ESP32 Starter Kit
5. Test Result
Connect the wirings and upload the code. Play Do when the distance is less than 10. Play Re when the distance is
within 10~20. Play Mi when the distance is within 20~30. Play Fa when the distance is within 30~40. Play So when
the distance is within 40~50. Play La when the distance is within 50~60. Play Si when the distance is within 60~70.
6. Code Explanation
|| : logical and operational signs. if (distance < 2 || distance >= 400): If one of the expressions satisfies the condition,
it is true, otherwise it is false.
Please refer to official website for more details:[|| - Arduino Reference]:
8.5.28 Project 27: Intelligent Parking
1. Description
This intelligent parking system detects and optimizes parking position via an ultrasonic sensor. With this system, wrong
parking is avoided to a large extent.
Firstly, you need to install the sensor around the carpark. And then it will detect the distance between the car and its
edges and send the information to the development board so as to control the car to automatically adjust to the optimal
parking position.
144 Chapter 8. Arduino Tutorial

Table of Contents