writeEEPROM()
[EEPROM]
void writeEEPROM(unsigned short address, unsigned char value);Description
Writes a byte value (8 bits) to the EEPROM memory at the specified address.
Parameters
address: the address where the data will be written.
value: the data to be written.
Returns
Nothing.
Example Code
The code writes the value 0x55 to the EEPROM memory at the address 0x00.
void setup() {
beginEEPROM(1024); // initializes the EEPROM memory with a size of 1024 bytes and a data width of 1 byte
writeEEPROM(0x00, 0x55); // writes the value 0x55 to the EEPROM memory at the address 0x00
}
void loop() {
}Notes and Warnings
- The
writeEEPROM()function can only be used after thebeginEEPROM()function. - The
valueparameter must be an 8-bit value (0-255) or anunsigned char.
