Due to high demand expect some shipping delays at this time, orders may not ship for 1-2 business days.
0

Adafruit CircuitPython ServoKit => Continuous Rotation Servo
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Adafruit CircuitPython ServoKit => Continuous Rotation Servo

by Tricia279 on Thu Apr 22, 2021 8:15 am

Hi,
while we try to use your code:
kit.continuous_servo[1].throttle = 1
it is not working.

We got the following error:
kit.continuous_servo[servo_cha].throttle = 1
File "/home/raspy/.local/lib/python3.8/site-packages/adafruit_servokit.py", line 180, in __getitem__
raise ValueError("Channel {} is already in use.".format(servo_channel))
ValueError: Channel 0 is already in use.
The servo_cha is a variable.

We appreciate your help very much.

KR
Robert

Tricia279
 
Posts: 4
Joined: Thu Jul 02, 2020 7:36 am

Re: Adafruit CircuitPython ServoKit => Continuous Rotation S

by tannewt on Thu Apr 22, 2021 12:03 pm

Please post your full code.

tannewt
 
Posts: 2393
Joined: Thu Oct 06, 2016 8:48 pm

Re: Adafruit CircuitPython ServoKit => Continuous Rotation S

by Tricia279 on Thu Apr 29, 2021 5:31 am

Hello tannewt,
sorry for the delay.
Beside you will find the full code.
Please tell me, if you checked it, why it is not working and who did the mistake.
Thank you for your help.
KR
Robert
alias Tricia279
Attachments
20210429_Error_CirquitPython_PCA9685.py
(3.26 KiB) Downloaded 1 time

Tricia279
 
Posts: 4
Joined: Thu Jul 02, 2020 7:36 am

Re: Adafruit CircuitPython ServoKit => Continuous Rotation S

by tannewt on Sun May 02, 2021 3:51 pm

I suspect you are mixing `.servo` and `.continuous_servo` for the channel that errors. That's what causes the in use error: https://github.com/adafruit/Adafruit_Ci ... it.py#L180

tannewt
 
Posts: 2393
Joined: Thu Oct 06, 2016 8:48 pm

Please be positive and constructive with your questions and comments.