wt-lcd-device

wayland/wio-terminal-lcd/wt-lcd-device

Create an LCD device.
wt-lcd-device
@/wt-lcd-device
Create an LCD device.
wt-lcd-device
DEV
DEV@/wt-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

#pragma XOD require "https://github.com/WaylandM/wio-terminal"

//Include C++ libraries
#include "TFT_eSPI.h"
#include "Free_Fonts.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);
    }
}