An M5Stack library for scrolling text.
- Scroll from left to right on the lcd
- Customize color and speed
- Initialize your Platform IO project
- Install the library and its dependency
platformio init -d . -b m5stack-core-esp32
platformio lib install M5Clock
platformio lib install M5Unified
Warning This library has been tested only with M5Stack and M5StickC-PLUS.
#include <M5Unified.h>
#include <M5TextScroll.h>
M5TextScroll ts;
void setup() {
auto cfg = M5.config();
M5.begin(cfg);
ts.init(0, 0);
ts.setText("Hello World!");
}
void loop() {
M5.update();
if (M5.BtnA.wasPressed()) {
if (ts.isDrawing()) {
ts.stop();
}
else {
ts.start();
}
}
if (M5.BtnB.wasPressed()) {
ts.setText("BtnB was pressed!");
}
delay(100);
}
You can also read the module doc for a list of supported calls.
Yushin Ito
MIT License