EasyManua.ls Logo

Freenove ESP32

Default Icon
159 pages
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...
Need support? support@freenove.com
108
Chapter 10 Ultrasonic Ranging
www.freenove.com
Sketch
In this chapter, we use GPIO32 of ESP32 as the Trig pin of the ultrasonic module, and GPIO12 as the Echo pin
of the ultrasonic module.
Open Sketch_05_Ultrasonic folder in Freenove_Robot_Dog_Kit_for_ESP32\Sketches and then double-
click Sketch_05_Ultrasonic.ino.
Sketch_05_Ultrasonic
Upload the sketch to ESP32 and the robot will acquire ultrasonic data every 500 milliseconds and prints
them out through the serial port.

Related product manuals