====== EERead ======
Read data from non-volatile memory.
This feature is supported only on models with built-in FRAM.
===== Syntax =====
from cubloc import EERead
EERead(address: int,
byteLength: int,
returnType: type[int] | type[float] | type[bytes] | type[bytearray] = int)
===== Parameters =====
* **address**: EEPROM ''address'' (0 to 4095).
* **byteLength**: Number of bytes to read. Must be positive and remain within the non-volatile memory's bounds.
* **returnType**: Use ''int'', ''float'', ''bytes'', or ''bytearray'' to control how the data is decoded. The default is ''int''.
===== Return Value =====
Returns the data according to ''returnType'' as ''int'', ''float'', ''bytes'', or ''bytearray''.
===== Exceptions =====
* [[https://docs.micropython.org/en/latest/library/builtins.html#TypeError|TypeError]]: ''address'', ''byteLength'', or ''returnType'' is invalid.
* [[https://docs.micropython.org/en/latest/library/builtins.html#ValueError|ValueError]]: ''address'' or ''byteLength'' is out of range, the read would extend past ''address'' 4095, or a ''float'' read was requested with a ''byteLength'' other than 4.
===== Example =====
from cubloc import EERead
# Example usage
result = EERead(1, 1, int)
print(result)
===== Related APIs =====
* [[logicpython:cubloc_api:eewrite|EEWrite]]