
Arduino 上手教程
M5DinMeter。
M5Unified,M5GFX,M5DinMeter驱动库安装。
在Arduino IDE中新建程序,并粘贴下方Hello World案例代码,编译并烧录至设备,显示屏和串口监视器将显示"HelloWorld"!
#include <M5Unified.h>
//––– Adjust these to position your text –––
static const int16_t X_POS = 0; // horizontal pixel offset
static 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
}
2.上传完成就可以看到下面的效果了