/ README.md
README.md
 1  # circuitpython-at24mac-eeprom
 2  
 3  Driver to interface with AT24MAC402 and AT24MAC602 devices using I2C
 4  
 5  ## Usage
 6  
 7  the AT24MACx02 devices are EEPROM devices with a built-in MAC address. 
 8  
 9  ```python
10  import at24mac
11  import board
12  i2c = busio.I2C(board.SCL, board.SDA)
13  eeprom = at24mac_eeprom.AT24MAC(i2c)
14  
15  print(eeprom.mac)  # Format for use with Wiznet5k
16  print([hex(val) for val in eeprom.mac])  # Readable format
17  print(eeprom.serial_number)
18  print()
19  
20  # Write and read to address 0 
21  eeprom[0] = 76
22  print(eeprom[0])
23  print()
24  
25  # Write and read to address 100-104
26  eeprom[100] = [6, 7, 8, 9, 10]
27  print([val for val in eeprom[100:105]])
28  print()
29  
30  ```