adafruit / Adafruit_CircuitPython_ServoKit

CircuitPython helper library for the PWM/Servo FeatherWing, Shield and Pi HAT kits.
MIT License
71 stars 31 forks source link

Hello, i'm trying to use PCA96885 Raspberry Pico running Micropython. it trows an error:- THIS ----ImportError: no module named 'busio' #51

Open ArunKRanadeep opened 8 months ago

ArunKRanadeep commented 8 months ago

import time import busio

from adafruit_servokit import ServoKit kit = ServoKit(channels=16,i2c=(busio.I2C(board.SCL, board.SDA)))

Tuned for GWS S03T STD Servos

kit.servo[0].set_pulse_width_range(775, 2450) kit.servo[1].set_pulse_width_range(775, 2450)

Return servos to starting positions

kit.servo[0].angle = 0 kit.servo[1].angle = 180 time.sleep(1)

while True: for tgtAngle in range(0, 180, 1): kit.servo[0].angle = tgtAngle kit.servo[1].angle = 180 - tgtAngle time.sleep(0.1) for tgtAngle in range(180, 0, -1): kit.servo[0].angle = tgtAngle kit.servo[1].angle = 180 - tgtAngle time.sleep(0.1)

can you help me ,

caternuson commented 5 months ago

You'll need to install Blinka: https://learn.adafruit.com/circuitpython-libraries-on-micropython-using-the-raspberry-pi-pico/overview