File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change 12
12
lis3dh = adafruit_lis3dh .LIS3DH_I2C (i2c , address = 0x19 , int1 = int1 )
13
13
else :
14
14
i2c = busio .I2C (board .SCL , board .SDA )
15
- int1 = digitalio .DigitalInOut (board .D6 ) # Set this to the correct pin for the interrupt!
15
+ int1 = digitalio .DigitalInOut (board .D6 ) # Set to correct pin for interrupt!
16
16
lis3dh = adafruit_lis3dh .LIS3DH_I2C (i2c , int1 = int1 )
17
17
18
18
# Hardware SPI setup:
19
19
# spi = busio.SPI(board.SCK, board.MOSI, board.MISO)
20
- # cs = digitalio.DigitalInOut(board.D9) # Set to appropriate CS pin!
21
- # lis3dh = adafruit_lis3dh.LIS3DH_SPI(spi, cs)
20
+ # 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)
22
23
23
24
24
25
# Set range of accelerometer (can be RANGE_2_G, RANGE_4_G, RANGE_8_G or RANGE_16_G).
Original file line number Diff line number Diff line change 15
15
int1 = digitalio .DigitalInOut (board .D9 ) # Set this to the correct pin for the interrupt!
16
16
lis3dh = adafruit_lis3dh .LIS3DH_I2C (i2c , int1 = int1 )
17
17
18
+ # Hardware SPI setup:
19
+ # spi = busio.SPI(board.SCK, board.MOSI, board.MISO)
20
+ # 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)
23
+
18
24
# Set range of accelerometer (can be RANGE_2_G, RANGE_4_G, RANGE_8_G or RANGE_16_G).
19
25
lis3dh .range = adafruit_lis3dh .RANGE_8_G
20
26
You can’t perform that action at this time.
0 commit comments