Skip to content

Commit e245ebc

Browse files
authored
Merge pull request #8 from kattni/example-update
Removed SPI from example.
2 parents e50c6e2 + 108130d commit e245ebc

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

examples/lsm9ds1_simpletest.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,14 @@
11
# Simple demo of the LSM9DS1 accelerometer, magnetometer, gyroscope.
22
# Will print the acceleration, magnetometer, and gyroscope values every second.
33
import time
4-
54
import board
65
import busio
7-
# import digitalio # Use when connected over SPI
8-
96
import adafruit_lsm9ds1
107

11-
12-
# You have a couple options for wiring this sensor, either I2C (recommended)
13-
# or a SPI connection. Choose _one_ option below and uncomment it:
14-
158
# I2C connection:
169
i2c = busio.I2C(board.SCL, board.SDA)
1710
sensor = adafruit_lsm9ds1.LSM9DS1_I2C(i2c)
1811

19-
# SPI connection:
20-
#spi = busio.SPI(board.SCK, MOSI=board.MOSI, MISO=board.MISO)
21-
#xgcs = digitalio.DigitalInOut(board.D5) # Pin connected to XGCS (accel/gyro chip select).
22-
#mcs = digitalio.DigitalInOut(board.D6) # Pin connected to MCS (magnetometer chip select).
23-
#sensor = adafruit_lsm9ds1.LSM9DS1_SPI(spi, xgcs, mcs)
24-
2512
# Main loop will read the acceleration, magnetometer, gyroscope, Temperature
2613
# values every second and print them out.
2714
while True:

0 commit comments

Comments
 (0)