Arduino Quick Start
M5DinMeter
board.M5Unified
, M5GFX
and M5DinMeter
driver libraries.setup()
must drive the HOLD pin (G46) high to maintain power; otherwise the device will immediately re‑enter sleep.
Power off: Without USB external power, press the RST button; or in software, set HOLD (GPIO46) = 0 to cut power when no USB supply.Connect the device to your PC via USB. After the driver installs, select the corresponding board and COM port in the Arduino IDE.
#include <M5Unified.h> //––– Adjust these to position your text –––static const int16_t X_POS = 0; // horizontal pixel offsetstatic const int16_t Y_POS = 60; // vertical pixel offset void setup() { auto cfg = M5.config(); M5.begin(cfg); M5.Display.setTextSize(2); M5.Display.setCursor(X_POS, Y_POS); M5.Display.println("Hello World!"); Serial.begin(115200); Serial.println("Hello World!!!");} void loop() { // nothing here}
After uploading, you can see the following effect: