Transforms 4 letter input string to 4 output bytes.
letters-word-to-bytes
@/letters-word-to-bytes
Transforms 4 letter input string to 4 output bytes.
WORDstring
S4byte
S3byte
S2byte
S1byte
To use the node in your project you should have the gabbapeople/iot-split-flap-display 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 evaluate(Context ctx) {
auto word = getValue<input_WORD>(ctx);
auto it = word.iterate();
emitValue<output_S1>(ctx, *it);
++it;
emitValue<output_S2>(ctx, *it);
++it;
emitValue<output_S3>(ctx, *it);
++it;
emitValue<output_S4>(ctx, *it);
++it;
}