File tree 2 files changed +4
-11
lines changed
2 files changed +4
-11
lines changed Original file line number Diff line number Diff line change 1
1
import time
2
2
3
3
from board import *
4
- # Use this import for ESP8266 and other boards with software I2C interfaces:
5
- import bitbangio as io
6
- # Or use this import for SAMD21 and boards with a native hardware I2C interace:
7
- #import nativeio as io
4
+ import busio
8
5
9
6
# Import the PCA9685 servo module.
10
7
from adafruit_pca9685 import servo
11
8
12
9
13
10
# Create the I2C bus interface.
14
- i2c = io .I2C (SCL , SDA )
11
+ i2c = busio .I2C (SCL , SDA )
15
12
16
13
# Create a simple PCA9685 class instance.
17
14
servos = servo .Servos (i2c )
Original file line number Diff line number Diff line change 1
1
from board import *
2
- # Use this import for ESP8266 and other boards with software I2C interfaces:
3
- import bitbangio as io
4
- # Or use this import for SAMD21 and boards with a native hardware I2C interace:
5
- #import nativeio as io
2
+ import busio
6
3
7
4
# Import the PCA9685 module.
8
5
from adafruit_pca9685 import pca9685
9
6
10
-
11
7
# Create the I2C bus interface.
12
- i2c = io .I2C (SCL , SDA )
8
+ i2c = busio .I2C (SCL , SDA )
13
9
14
10
# Create a simple PCA9685 class instance.
15
11
pca = pca9685 .PCA9685 (i2c )
You can’t perform that action at this time.
0 commit comments