SunFounder ESP32 Starter Kit
Code
Note:
• Open the 5.11_joystick.ino file under the path of esp32-starter-kit-main\c\codes\5.11_joystick.
• After selecting the board (ESP32 Dev Module) and the appropriate port, click the Upload button.
• Always displaying “Unknown COMxx”?
Open the serial monitor after the code has been uploaded successfully to see the x,y,z values of the joystick.
• The x-axis and y-axis values are analog values that vary from 0 to 4095.
• The Z-axis is a digital value with a status of 1 or 0 ( when pressed, it is 0 ).
1.28 5.12 Measuring Distance
The ultrasonic module is used for distance measurement or object detection. In this project, we will program the module
to obtain obstacle distances. By sending ultrasonic pulses and measuring the time it takes for them to bounce back, we
can calculate distances. This enables us to implement distance-based actions or obstacle avoidance behaviors.
Required Components
In this project, we need the following components.
It’s definitely convenient to buy a whole kit, here’s the link:
Name ITEMS IN THIS KIT LINK
ESP32 Starter Kit 320+
You can also buy them separately from the links below.
96 Chapter 1. For Arduino User