ESP32 Starter Kit
5. Test Result
After connecting the wiring and uploading code, open serial monitor to set baud rate to 9600, and the serial port starts
to print the distance value.
6. Knowledge Expansion
Let’s make a rangefinder.
We display characters on LCD 1602. Program to show “Keyestudio” at (3,0) and “distance:” at (0,1) followed by the
distance value at (9,1).
When the value is smaller than 100(or 10), a residue of the third(or the second) bit still exists. Therefore, an “if”
judgement is necessary to determine a certain condition.
Wiring Diagram
308 Chapter 9. Scratch Tutorial