Skip to content

yushin-ito/M5TextScroll

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

M5TextScroll


📝 Overview

An M5Stack library for scrolling text.

🚀 Features

  • Scroll from left to right on the lcd
  • Customize color and speed


📦 Installation



  1. Initialize your Platform IO project
  2. platformio init -d . -b m5stack-core-esp32
  3. Install the library and its dependency
  4. platformio lib install M5Clock
    platformio lib install M5Unified

🔧 Usage

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.


👀 Author

Yushin Ito

📜 License

MIT License