
Arduino Quick Start
M5PowerHub.
M5Unified library, and install all dependent libraries as prompted.
Connect the device to your computer via a USB-C data cable. Press and hold the side BtnPWR button for 3 seconds until the indicator light next to the black antenna flashes blue several times. The device will then enter download mode, and you can select the corresponding controller and device port in Arduino IDE.
#include <M5Unified.h>
void setup() {
M5.begin();
M5.Led.setBrightness(127);
}
void loop() {
M5.update();
M5.Led.setAllColor(TFT_WHITE);
M5.Led.display();
delay(500);
M5.Led.setAllColor(TFT_BLACK);
M5.Led.display();
delay(500);
}Copy the above program into Arduino IDE, then click the Upload button. After the program is compiled and uploaded, all LEDs will flash white: