No description
Find a file
2023-10-06 08:38:14 -04:00
examples Initial 2023-09-28 16:56:03 -04:00
AT24MAC_EEPROM.py Fixed repo link 2023-10-06 08:38:14 -04:00
LICENSE Update license 2023-10-05 10:43:55 -04:00
pyproject.toml Initial 2023-09-28 16:56:03 -04:00
README.md Initial 2023-09-28 16:56:03 -04:00

circuitpython-at24mac-eeprom

Driver to interface with AT24MAC402 and AT24MAC602 devices using I2C

Usage

the AT24MACx02 devices are EEPROM devices with a built-in MAC address.

import at24mac
import board
i2c = busio.I2C(board.SCL, board.SDA)
eeprom = at24mac_eeprom.AT24MAC(i2c)

print(eeprom.mac)  # Format for use with Wiznet5k
print([hex(val) for val in eeprom.mac])  # Readable format
print(eeprom.serial_number)
print()

# Write and read to address 0 
eeprom[0] = 76
print(eeprom[0])
print()

# Write and read to address 100-104
eeprom[100] = [6, 7, 8, 9, 10]
print([val for val in eeprom[100:105]])
print()