こちらのプログラムを改造して文字を点滅させてみました。
M5Paper で Hello World
hello_blink.ino
// ---------------------------------------------------------------
// hello_blink.ino
//
// Jun/02/2022
// ---------------------------------------------------------------
#include <M5EPD.h>
M5EPD_Canvas canvas(&M5.EPD);
String ssx[] = {"Hello World","Good Morning","Good Afternoon",
"Good Evening","Good Night"};
// ---------------------------------------------------------------
void setup(){
M5.begin();
M5.EPD.Clear(true);
M5.RTC.begin();
canvas.createCanvas(960, 540);
canvas.setTextSize(5);
int xx = 100;
int yy_start = 30;
for (int it=0; it< 5; it++)
{
int yy = yy_start + it * 80;
canvas.drawString(ssx[it], xx, yy);
}
canvas.drawString("Jun/2/2022 PM 14:27", xx+100, yy_start+400);
canvas.pushCanvas(0,0,UPDATE_MODE_DU4);
}
// ---------------------------------------------------------------
void loop(){
int xx = 100;
int yy_start = 30;
for (int it=0; it< 5; it++)
{
int yy = yy_start + it * 80;
canvas.drawString(" ", xx, yy);
canvas.pushCanvas(0,0,UPDATE_MODE_DU4);
delay (1000);
canvas.drawString(ssx[it], xx, yy);
canvas.pushCanvas(0,0,UPDATE_MODE_DU4);
delay (1000);
}
}
// ---------------------------------------------------------------
Arduino IDE
