Mapped to Arduino's EEPROM.update(addr, val); https://www.arduino.cc/en/Reference/EEPROMUpdate
eeprom-update
@/eeprom-update
Mapped to Arduino's EEPROM.update(addr, val); https://www.arduino.cc/en/Reference/EEPROMUpdate
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 update function
OKpulse
Emitted after calling EEPROM.update
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.update(addr, val);
emitValue<output_OK>(ctx, true);
}
}