Mapped to Arduino's EEPROM.write(addr, val); https://www.arduino.cc/en/Reference/EEPROMWrite
eeprom-write
@/eeprom-write
Mapped to Arduino's EEPROM.write(addr, val); https://www.arduino.cc/en/Reference/EEPROMWrite
ADDRnumber
Address in EEPROM where the value should be stored
VALbyte
The value to be stored in the EEPROM at the address specified
UPDpulse
Trigger the write function
OKpulse
Emitted after calling EEPROM.write
To use the node in your project you should have the dancojocaru2000/arduino-eeprom 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/dancojocaru2000/ArduinoEEPROM"
{{#global}}
#include <EEPROM.h>
{{/global}}
struct State {
};
{{ GENERATED_CODE }}
void evaluate(Context ctx) {
if (isInputDirty<input_UPD>(ctx)) {
auto addr = getValue<input_ADDR>(ctx);
auto val = getValue<input_VAL>(ctx);
EEPROM.write(addr, val);
emitValue<output_OK>(ctx, true);
}
}