Simple test
Ensure your device works with this simple test.
examples/24lc32_simpletest.py
1# SPDX-FileCopyrightText: Copyright (c) 2021 Tim Cocks for Adafruit Industries
2#
3# SPDX-License-Identifier: Unlicense
4
5import board
6
7import adafruit_24lc32
8
9i2c = board.I2C() # uses board.SCL and board.SDA
10# i2c = board.STEMMA_I2C() # For using the built-in STEMMA QT connector on a microcontroller
11eeprom = adafruit_24lc32.EEPROM_I2C(i2c)
12
13print(f"length: {len(eeprom)}")
14
15# eeprom[0] = 4
16# print(eeprom[0])
17
18# eeprom[0:4] = [9, 3, 8, 1]
19# print(eeprom[0:4])