lcd-device

wayland/wio-terminal-lcd/lcd-device

Create an LCD device.
lcd-device
@/lcd-device
Create an LCD device.
lcd-device
DEV
DEV@/lcd-device
An LCD device.
To use the node in your project you should have the wayland/wio-terminal-lcd library installed. Use the “File → Add Library” menu item in XOD IDE if you don’t have it yet. See Using libraries for more info.

C++ implementation

//Include C++ libraries
#include"TFT_eSPI.h"


node {

    meta {
        // Define our custom type as a pointer on the class instance.
        using Type = TFT_eSPI*;
    }

    // Create an object of class TFT_eSPI tft
    TFT_eSPI tft = TFT_eSPI();

    void evaluate(Context ctx) {
        // It should be evaluated only once on the first (setup) transaction
        if (!isSettingUp())
            return;

        // Try to initialize sensor
        tft.begin();
        tft.setRotation(3);

        emitValue<output_DEV>(ctx, &tft);
    }
}