Keyestudio ESP32 Manual page 150

Starter kit
Hide thumbs Also See for ESP32:
Table of Contents

Advertisement

ESP32 Starter Kit
3. Wiring Diagram
4. Test Code
When parking, we can use the ultrasonic to know the situation of blind spots. In this project, lines displayed on the dot
matrix indicates the distance of the car.
/*
keyestudio ESP32 Inventor Learning Kit
Project 27 Intelligent Parking
http://www.keyestudio.com
*/
#include
<LedControl.h>
int
DIN
=
23;
//Define DIN pin to IO23
int
CS
=
15;
//Define CS pin to IO15
int
CLK
=
18;
//Define CLK pin to IO18
int
temp
=
0;
int
distance
=
0;
//Define a variable to receive the distance
int
EchoPin
=
14;
//Connect Echo pin to IO14
int
TrigPin
=
13;
//Connect Trig pin to IO13
146
(continues on next page)
Chapter 8. Arduino Tutorial

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ESP32 and is the answer not in the manual?

Questions and answers

Related Products for Keyestudio ESP32

Table of Contents

Save PDF