Skip to content

facts-engineering/CircuitPython_AT24MAC_EEPROM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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()

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages