I use
import RPi.gpio as gpio
gpiosetmode(board)
p.pwm(33, 100) etc
but these code got error when using pca9685 servokit together
which is “different mode has already set”
so I find something different code that adafruit_pca 9685, adafruit_motor
I think it works good, because there is no crash and controling dc motor speed is work
but my code motor1.throttle =0 is not working
motor1.throttle=0 is dc motor stop code
L dc motor not stopping but working with low speed
I don’t know why these error is work :( could you help me?
my full code is
from board import SCL, SDA
from adafruit_pca9685 import PCA9685
from adafruit_motor import motor
i2c = busio,I2 (SCL, SDA)
pca = PCA9685(i2c, address=0x40)
pca.frequnecy =100
pca.channels[8].duty_cycle = 0xFFFF
motor1 = motor.DCMotor(pca.channels[9], pca.channels[10])
motor1.throttle = 0.5
time.sleep(3)
motor1.throttle = 1
time,sleep(3)
motor1.throttle = 0
tiem,sleep(3)
pca,deinit()