adafruit / Adafruit_CircuitPython_PCA9685

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

fixed pca9685_servo.py example #36

Closed jvalrog closed 3 years ago

jvalrog commented 3 years ago

I copied the servo sweep example from CircuitPython-Motor as it's the same example but that one has the delays in place.

The code was tested in a raspberry pi.

jvalrog commented 3 years ago

So apparently pylint don't like variable names (it thinks they are constants). But this is the actual file from the Motor library, so it must fail there too.

evaherrada commented 3 years ago

@jvalrog Hey. So basically what you're gonna want to do is take the line:

from adafruit_motor import servo

(line 12) and cut it and paste it above:

from adafruit_pca9685 import PCA9685

(line 11)

jvalrog commented 3 years ago

@dherrada fixed

evaherrada commented 3 years ago

@ladyada Ok this is passing. I don't have the hardware to test

jerryneedell commented 3 years ago

I ran this on a Feather M4 -- servo did its sweep.

jposada202020 commented 3 years ago

@dherrada could we merged now this is tested. let me know thanks..

evaherrada commented 3 years ago

Yep!

jposada202020 commented 3 years ago

:) thanks @dherrada and @jerryneedell

evaherrada commented 3 years ago

Thank you!