adafruit / Adafruit_CircuitPython_PCA9685

Adafruit CircuitPython driver for PCA9685 16-channel, 12-bit PWM LED & servo driver chip.
MIT License
125 stars 64 forks source link

Examples need updated formats #54

Closed DJDevon3 closed 1 year ago

DJDevon3 commented 1 year ago
import time

from board import SCL, SDA
import busio

# Import the PCA9685 module. Available in the bundle and here:
#   https://github.com/adafruit/Adafruit_CircuitPython_PCA9685
from adafruit_motor import servo
from adafruit_pca9685 import PCA9685

i2c = busio.I2C(SCL, SDA)

should look more like this

import time
import board
import busio
from adafruit_motor import servo
from adafruit_pca9685 import PCA9685

i2c = busio.I2C(board.SCL, board.SDA)
# i2c = busio.I2C(board.GP1, board.GP0)    # Pi Pico RP2040

I don't have the board to test the initializations and ensure the formatting works. Just ran across these outdated looking library discrepancies while fielding a support question. Could be a good first issue for anyone having this board to update the formatting.

DJDevon3 commented 1 year ago

I've submitted PR's for these. Closing issue.