Skip to content

Commit 3662992

Browse files
committed
update simpletest example
1 parent 3fbf837 commit 3662992

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

examples/lis3dh_simpletest.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,19 @@
88
# otherwise check I2C pins.
99
if hasattr(board, "ACCELEROMETER_SCL"):
1010
i2c = busio.I2C(board.ACCELEROMETER_SCL, board.ACCELEROMETER_SDA)
11-
int1 = digitalio.DigitalInOut(board.ACCELEROMETER_INTERRUPT)
12-
lis3dh = adafruit_lis3dh.LIS3DH_I2C(i2c, address=0x19, int1=int1)
11+
lis3dh = adafruit_lis3dh.LIS3DH_I2C(i2c, address=0x19)
1312
else:
1413
i2c = busio.I2C(board.SCL, board.SDA)
15-
int1 = digitalio.DigitalInOut(board.D6) # Set to correct pin for interrupt!
16-
lis3dh = adafruit_lis3dh.LIS3DH_I2C(i2c, int1=int1)
14+
lis3dh = adafruit_lis3dh.LIS3DH_I2C(i2c)
1715

1816
# Hardware SPI setup:
1917
# spi = busio.SPI(board.SCK, board.MOSI, board.MISO)
2018
# cs = digitalio.DigitalInOut(board.D5) # Set to correct CS pin!
21-
# int1 = digitalio.DigitalInOut(board.D6) # Set to correct pin for interrupt!
22-
# lis3dh = adafruit_lis3dh.LIS3DH_SPI(spi, cs, int1=int1)
19+
# lis3dh = adafruit_lis3dh.LIS3DH_SPI(spi, cs)
2320

2421
# PyGamer or MatrixPortal I2C Setup:
2522
# i2c = busio.I2C(board.SCL, board.SDA)
26-
# int1 = digitalio.DigitalInOut(board.ACCELEROMETER_INTERRUPT)
27-
# lis3dh = adafruit_lis3dh.LIS3DH_I2C(i2c, address=0x19, int1=int1)
23+
# lis3dh = adafruit_lis3dh.LIS3DH_I2C(i2c, address=0x19)
2824

2925

3026
# Set range of accelerometer (can be RANGE_2_G, RANGE_4_G, RANGE_8_G or RANGE_16_G).

0 commit comments

Comments
 (0)