Skip to content

Commit

Permalink
Merge pull request #8 from kattni/example-update
Browse files Browse the repository at this point in the history
Removed SPI from example.
  • Loading branch information
caternuson committed Aug 21, 2018
2 parents e50c6e2 + 108130d commit e245ebc
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions examples/lsm9ds1_simpletest.py
Original file line number Diff line number Diff line change
@@ -1,27 +1,14 @@
# Simple demo of the LSM9DS1 accelerometer, magnetometer, gyroscope.
# Will print the acceleration, magnetometer, and gyroscope values every second.
import time

import board
import busio
# import digitalio # Use when connected over SPI

import adafruit_lsm9ds1


# You have a couple options for wiring this sensor, either I2C (recommended)
# or a SPI connection. Choose _one_ option below and uncomment it:

# I2C connection:
i2c = busio.I2C(board.SCL, board.SDA)
sensor = adafruit_lsm9ds1.LSM9DS1_I2C(i2c)

# SPI connection:
#spi = busio.SPI(board.SCK, MOSI=board.MOSI, MISO=board.MISO)
#xgcs = digitalio.DigitalInOut(board.D5) # Pin connected to XGCS (accel/gyro chip select).
#mcs = digitalio.DigitalInOut(board.D6) # Pin connected to MCS (magnetometer chip select).
#sensor = adafruit_lsm9ds1.LSM9DS1_SPI(spi, xgcs, mcs)

# Main loop will read the acceleration, magnetometer, gyroscope, Temperature
# values every second and print them out.
while True:
Expand Down

0 comments on commit e245ebc

Please sign in to comment.