Arduino入門
M5DinMeter
を選択します。M5Unified
と M5GFX
,M5DinMeter
ドライバーライブラリをインストールします。#include <M5Unified.h>
//––– 位置調整用の定数 –––
static const int16_t X_POS = 0; // 横方向のピクセルオフセット
static const int16_t Y_POS = 60; // 縦方向のピクセルオフセット
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() {
// 何もしない
}
アップロード完了後、以下のような表示が確認できます。