: arduinoioaddons.EEPRomAddon.EEPRom

EEPROM addon for arduino

Allows read and write of uint8 data to the onboard arduino EEPROM.

Example

Assuming eeprom addon has been programmed into the Arduino:

a = arduino ();
e = addon (a, "eepromaddon/eeprom");
write (e, 0, uint8("hello world"));
str = uint8( read(e, 0, 11) )

See also: addon.

Properties

length - Size of the EEPROM.

Methods

: eeprom = EEPRom ()

Constructor to create EEPROM device.

Outputs

eeprom - created EEPROM device.

: erase ()

Erase all values in EEPROM (Effectively setting the 0xFF)

: write (address, uintdata)

Write data to EEPROM at the provided address.

Inputs

address - start address to write data to, should be an integer between 0 and the size of the EEPROM.

uintdata a value or array of uint8 data to write to EEPROM.

: data = read (address)
: data = read (address, count)

Read data from starting address of EEPROM.

Inputs

address - start address to read data from, should be an integer between 0 and the size of the EEPROM.

count - Number of uint8 values to read from the EEPROM (default is 1)

Outputs

data a value or array of uint8 data read from the EEPROM.

Package: arduino