Closed
Description
The current lis3dh_simpletest example uses the existence of ACCELEROMETER_SCL to determine the pin configuration and I2C address
https://github.com/adafruit/Adafruit_CircuitPython_LIS3DH/blob/master/examples/lis3dh_simpletest.py#L9
if hasattr(board, 'ACCELEROMETER_SCL'):
i2c = busio.I2C(board.ACCELEROMETER_SCL, board.ACCELEROMETER_SDA)
int1 = digitalio.DigitalInOut(board.ACCELEROMETER_INTERRUPT)
lis3dh = adafruit_lis3dh.LIS3DH_I2C(i2c, address=0x19, int1=int1)
else:
i2c = busio.I2C(board.SCL, board.SDA)
int1 = digitalio.DigitalInOut(board.D6) # Set to correct pin for interrupt!
lis3dh = adafruit_lis3dh.LIS3DH_I2C(i2c, int1=int1)
But this does not work for the pygamer. It has ACCELEROMETER_INTERRUPT but uses the default board SCL/SDA.
I'll be happy to put in a PR but wanted to see how you wanted to implement it or should there just be a separate lis3dh_pygamer_simpletest?
Metadata
Metadata
Assignees
Labels
No labels