Cov txheej txheem:

Txuas ESP 32 Nrog Ultrasonic Sensor: 3 Kauj Ruam
Txuas ESP 32 Nrog Ultrasonic Sensor: 3 Kauj Ruam

Video: Txuas ESP 32 Nrog Ultrasonic Sensor: 3 Kauj Ruam

Video: Txuas ESP 32 Nrog Ultrasonic Sensor: 3 Kauj Ruam
Video: Управление цифровым потенциометром с помощью Arduino — X9C103 2024, Hlis ntuj nqeg
Anonim
Txuas ESP 32 Nrog Ultrasonic Sensor
Txuas ESP 32 Nrog Ultrasonic Sensor

Ultrasonic sensors ua haujlwm los ntawm kev tso suab nthwv dej ntawm zaus ntau dhau rau tib neeg kom hnov. Tom qab ntawd lawv tos lub suab kom rov xav txog, suav qhov deb raws lub sijhawm xav tau. Qhov no zoo ib yam li radar ntsuas lub sijhawm nws siv lub xov tooj cua yoj kom rov qab tom qab tsoo ib yam khoom.

Cheebtsam yuav tsum tau: -

1. Ultrasonic sensor -

2. ESP32 -

3. Jumper xov hlau -

4. Breadboard (yeem) -

5. Arduino IDE software

6. Arduino NANO -

Teeb tsa koj Arduino IDE ua ntej xa cov cai hauv ESP32 yog qhov tseem ceeb heev:-https://www.instructables.com/id/Setting-Up-Ardui…

Kauj Ruam 1: Circuit Schematic

Circuit Schematic
Circuit Schematic
Circuit Schematic
Circuit Schematic

Ultrasonic sensor - -> ESP32 pins

Echo Pin - -> GPIO5

Trigger Pin - -> GPIO 18

VCC - -> VIN (5V)

GND - -> GND

Kauj Ruam 2: Txoj Cai Rau Txuas ESP32 Nrog Ultrasonic Sensor

Code rau Txuas ESP32 Nrog Ultrasonic Sensor
Code rau Txuas ESP32 Nrog Ultrasonic Sensor

Cov kauj ruam ua raws thaum xa cov cai hauv ESP32 pawg thawj coj

1. Nyem rau upload.2. Yog tsis muaj qhov yuam kev. Hauv qab ntawm Arduino IDE, thaum peb tau txais cov lus Txuas …, …, 3. Nias lub pob khau raj ntawm ESP 32 pawg thawj coj kom txog thaum koj tau txais cov lus ua tiav xa tawm.

4. Tom qab koj tus lej tau xa tawm tiav. Nias pab khawm kom rov pib dua lossis pib code tso rau ntawm ESP32 pawg thawj coj.

Kauj ruam 3: Serial Monitor

Saib Xyuas
Saib Xyuas
Saib Xyuas
Saib Xyuas

Cov txiaj ntsig sib txawv yog vim tias kuv tab tom hloov qhov khoom thaum kuv lub sensor ua haujlwm.

Pom zoo: