Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/facts-engineering/circuitpython_at24mac_eeprom
https://github.com/facts-engineering/circuitpython_at24mac_eeprom
Last synced: about 16 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/facts-engineering/circuitpython_at24mac_eeprom
- Owner: facts-engineering
- License: mit
- Created: 2023-09-28T17:44:47.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-06T12:38:17.000Z (about 1 year ago)
- Last Synced: 2024-11-06T23:04:11.494Z (about 2 months ago)
- Language: Python
- Size: 4.88 KB
- Stars: 0
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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.
```python
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()```