SunFounder ESP32 Starter Kit
Note: A four-pin button is designed in an H shape. When the button is not pressed, the left and right pins are
disconnected, and current cannot flow between them. However, when the button is pressed, the left and right pins are
connected, creating a pathway for current to flow.
Code
Note:
• You can open the file 5.1_button.ino under the path of esp32-starter-kit-main\c\codes\5.1_button.
• After selecting the board (ESP32 Dev Module) and the appropriate port, click the Upload button.
• Always displaying “Unknown COMxx”?
Once the code is uploaded successfully, the LED lights up when you press the button and goes off when you release it.
At the same time you can open the Serial Monitor in the upper right corner to observe the value of the button, when
the button is pressed, “1” will be printed, otherwise “0” will be printed.
64 Chapter 1. For Arduino User