Skip to content

Commit 5b05f75

Browse files
committed
Update examples after nativeio split.
1 parent f10ce4d commit 5b05f75

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

examples/accel.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
# Uncomment _one_ of the hardware setups below depending on your wiring:
1111

1212
# Hardware I2C setup:
13-
import nativeio
14-
i2c = nativeio.I2C(board.SCL, board.SDA)
13+
import busio
14+
i2c = busio.I2C(board.SCL, board.SDA)
1515
lis3dh = adafruit_lis3dh.LIS3DH_I2C(i2c)
1616

1717
# Software I2C setup:
@@ -20,9 +20,9 @@
2020
#lis3dh = adafruit_lis3dh.LIS3DH_I2C(i2c)
2121

2222
# Hardware SPI setup:
23-
#import nativeio
24-
#spi = nativeio.SPI(board.SCK, board.MOSI, board.MISO)
25-
#cs = nativeio.DigitalInOut(board.D6) # Set to appropriate CS pin!
23+
#import busio
24+
#spi = busio.SPI(board.SCK, board.MOSI, board.MISO)
25+
#cs = busio.DigitalInOut(board.D6) # Set to appropriate CS pin!
2626
#lis3dh = adafruit_lis3dh.LIS3DH_SPI(spi, cs)
2727

2828

examples/adc.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
# Uncomment _one_ of the hardware setups below depending on your wiring:
1212

1313
# Hardware I2C setup:
14-
import nativeio
15-
i2c = nativeio.I2C(board.SCL, board.SDA)
14+
import busio
15+
i2c = busio.I2C(board.SCL, board.SDA)
1616
lis3dh = adafruit_lis3dh.LIS3DH_I2C(i2c)
1717

1818
# Software I2C setup:
@@ -21,9 +21,9 @@
2121
#lis3dh = adafruit_lis3dh.LIS3DH_I2C(i2c)
2222

2323
# Hardware SPI setup:
24-
#import nativeio
25-
#spi = nativeio.SPI(board.SCK, board.MOSI, board.MISO)
26-
#cs = nativeio.DigitalInOut(board.D6) # Set to appropriate CS pin!
24+
#import busio
25+
#spi = busio.SPI(board.SCK, board.MOSI, board.MISO)
26+
#cs = busio.DigitalInOut(board.D6) # Set to appropriate CS pin!
2727
#lis3dh = adafruit_lis3dh.LIS3DH_SPI(spi, cs)
2828

2929

examples/click.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
# Uncomment _one_ of the hardware setups below depending on your wiring:
1111

1212
# Hardware I2C setup:
13-
import nativeio
14-
i2c = nativeio.I2C(board.SCL, board.SDA)
13+
import busio
14+
i2c = busio.I2C(board.SCL, board.SDA)
1515
lis3dh = adafruit_lis3dh.LIS3DH_I2C(i2c)
1616

1717
# Software I2C setup:
@@ -20,9 +20,9 @@
2020
#lis3dh = adafruit_lis3dh.LIS3DH_I2C(i2c)
2121

2222
# Hardware SPI setup:
23-
#import nativeio
24-
#spi = nativeio.SPI(board.SCK, board.MOSI, board.MISO)
25-
#cs = nativeio.DigitalInOut(board.D6) # Set to appropriate CS pin!
23+
#import busio
24+
#spi = busio.SPI(board.SCK, board.MOSI, board.MISO)
25+
#cs = busio.DigitalInOut(board.D6) # Set to appropriate CS pin!
2626
#lis3dh = adafruit_lis3dh.LIS3DH_SPI(spi, cs)
2727

2828

@@ -33,7 +33,7 @@
3333
# - 0 = Disable click detection.
3434
# - 1 = Detect single clicks.
3535
# - 2 = Detect single and double clicks.
36-
# The second parameter is the threshold and a higher value means less sensitive
36+
# The second parameter is the threshold and a higher value means less sensitive
3737
# click detection. Note the threshold should be set based on the range above:
3838
# - 2G = 40-80 threshold
3939
# - 4G = 20-40 threshold

0 commit comments

Comments
 (0)