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
 6import adafruit_24lc32
 7
 8i2c = board.I2C()  # uses board.SCL and board.SDA
 9# i2c = board.STEMMA_I2C()  # For using the built-in STEMMA QT connector on a microcontroller
10eeprom = adafruit_24lc32.EEPROM_I2C(i2c)
11
12print("length: {}".format(len(eeprom)))
13
14# eeprom[0] = 4
15# print(eeprom[0])
16
17# eeprom[0:4] = [9, 3, 8, 1]
18# print(eeprom[0:4])