Complete the code to write the value 42 to EEPROM address 0.
#include <EEPROM.h> void setup() { EEPROM.[1](0, 42); } void loop() {}
The write function stores a byte value at a specific EEPROM address.
Complete the code to read a byte from EEPROM address 0 and store it in variable 'val'.
#include <EEPROM.h> void setup() { byte val = EEPROM.[1](0); } void loop() {}
The read function retrieves a byte stored at a given EEPROM address.
Fix the error in the code to update EEPROM address 1 only if the value is different.
#include <EEPROM.h> void setup() { byte newVal = 100; EEPROM.[1](1, newVal); } void loop() {}
The update function writes a byte only if it differs from the current EEPROM value, saving write cycles.
Fill both blanks to write value 55 to EEPROM address 2 and then read it back into 'val'.
#include <EEPROM.h> void setup() { EEPROM.[1](2, 55); byte val = EEPROM.[2](2); } void loop() {}
First, write stores the value, then read retrieves it.
Fill all three blanks to update EEPROM address 3 with 77 only if different, then read it into 'val', and finally write 88 to address 4.
#include <EEPROM.h> void setup() { EEPROM.[1](3, 77); byte val = EEPROM.[2](3); EEPROM.[3](4, 88); } void loop() {}
Use update to write only if different, read to get the value, and write to store 88.