Arduino Guide
M5Capsule
.M5Capsule
driver library.Connect the device to the computer via a USB cable. After the device enters download mode, the corresponding device port can be selected in Arduino IDE.
Open the example program “button” from the driver library. Click the upload button to automatically compile and upload the program.
Once the program is uploaded, press the button, and the buzzer will sound.
Github
Arduino API & Examples