File tree Expand file tree Collapse file tree 2 files changed +4
-11
lines changed Expand file tree Collapse file tree 2 files changed +4
-11
lines changed Original file line number Diff line number Diff line change 11import time
22
33from 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
85
96# Import the PCA9685 servo module.
107from adafruit_pca9685 import servo
118
129
1310# Create the I2C bus interface.
14- i2c = io .I2C (SCL , SDA )
11+ i2c = busio .I2C (SCL , SDA )
1512
1613# Create a simple PCA9685 class instance.
1714servos = servo .Servos (i2c )
Original file line number Diff line number Diff line change 11from 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
63
74# Import the PCA9685 module.
85from adafruit_pca9685 import pca9685
96
10-
117# Create the I2C bus interface.
12- i2c = io .I2C (SCL , SDA )
8+ i2c = busio .I2C (SCL , SDA )
139
1410# Create a simple PCA9685 class instance.
1511pca = pca9685 .PCA9685 (i2c )
You can’t perform that action at this time.
0 commit comments