custom-characters

rsbabin/custom-characters/custom-characters

No description
custom-characters
@/custom-characters
DEVxod-dev/text-lcd/text-lcd-i2c-device
An I2C text LCD device
numnumber
Custom character byte number (0-7)
byte1byte
Row 1 byte for character ( 1 = pixel on)
byte2byte
Row 2 byte for character ( 1 = pixel on)
byte3byte
Row 3 byte for character ( 1 = pixel on)
byte4byte
Row 4 byte for character ( 1 = pixel on)
byte5byte
Row 5 byte for character ( 1 = pixel on)
byte6byte
Row 6 byte for character ( 1 = pixel on)
byte7byte
Row 7 byte for character ( 1 = pixel on)
byte8byte
Row 8 byte for character ( 1 = pixel on)
custom-characters
DEV
num
byte1
byte2
byte3
byte4
byte5
byte6
byte7
byte8
DEV'
DONE
DONEpulse
Fires when the allocated area is updated
DEV'xod-dev/text-lcd/text-lcd-i2c-device
To use the node in your project you should have the rsbabin/custom-characters 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

struct State {
};

{{ GENERATED_CODE }}

void makeChar(LiquidCrystal_I2C* lcd, Number charnum, uint8_t b1, uint8_t b2, uint8_t b3, uint8_t b4,uint8_t b5, uint8_t b6, uint8_t b7, uint8_t b8) {
       uint8_t charData[8]={b1, b2, b3, b4, b5, b6, b7, b8,};
       lcd->createChar(charnum, charData);
    }

void evaluate(Context ctx) {

       auto t = getValue<input_DEV>(ctx);
            
       Number charNum = getValue<input_num>(ctx);
       uint8_t byte_1 = getValue<input_byte1>(ctx);
       uint8_t byte_2 = getValue<input_byte2>(ctx);
       uint8_t byte_3 = getValue<input_byte3>(ctx);
       uint8_t byte_4 = getValue<input_byte4>(ctx);
       uint8_t byte_5 = getValue<input_byte5>(ctx);
       uint8_t byte_6 = getValue<input_byte6>(ctx);
       uint8_t byte_7 = getValue<input_byte7>(ctx);
       uint8_t byte_8 = getValue<input_byte8>(ctx);

        if (charNum < 0 || charNum > 7) {
           raiseError<output_DONE>(ctx);
           return;
        }
      
        makeChar(t.lcd, charNum, byte_1, byte_2, byte_3, byte_4, byte_5, byte_6, byte_7, byte_8);
        emitValue<output_DONE>(ctx, 1);          
        emitValue<output_DEVU0027>(ctx, t);
    
}