2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

M5Paper で Hello World

Last updated at Posted at 2022-06-02

こちらを参考にしました。
Arduino IDE environment - M5Paper

実行結果
IMG_20220602_131655.jpg

プログラム

hello_world.ino
#include <M5EPD.h>

M5EPD_Canvas canvas(&M5.EPD);

void setup(){
    M5.begin();
    M5.EPD.Clear(true);

    M5.RTC.begin();
    canvas.createCanvas(960, 540);
    canvas.setTextSize(5);

    int ypos[]= {30,110,190,270,350,430};
    int xx = 100;
    
    canvas.drawString("Hello World", xx, ypos[0]);
    canvas.drawString("Good Morning", xx, ypos[1]); 
    canvas.drawString("Good Afternoon", xx, ypos[2]);
    canvas.drawString("Good Evening", xx, ypos[3]);
    canvas.drawString("Good Night", xx, ypos[4]);
    canvas.drawString("Jun/5/2022 PM 13:05", xx+100, ypos[5]);
    canvas.pushCanvas(0,0,UPDATE_MODE_DU4);
}

void loop(){
}

Arduino IDE からプログラムをアップロードしました。

image.png

設定の手順

ボードマネージャーの URL を加える

https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/arduino/package_m5stack_index.json

m5paper-1.png

ボードマネージャーで M5Stack を加える

m5paper-2.png

M5EPD.h をインストール
image.png

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?