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
Adafruit CircuitPython ServoKit => Continuous Rotation Servo
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- Tricia279
- Posts: 4
- Joined: Thu Jul 02, 2020 7:36 am
- tannewt
- Posts: 3315
- Joined: Thu Oct 06, 2016 8:48 pm
Re: Adafruit CircuitPython ServoKit => Continuous Rotation S
Please post your full code.
- Tricia279
- Posts: 4
- Joined: Thu Jul 02, 2020 7:36 am
Re: Adafruit CircuitPython ServoKit => Continuous Rotation S
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
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 3 times
- tannewt
- Posts: 3315
- Joined: Thu Oct 06, 2016 8:48 pm
Re: Adafruit CircuitPython ServoKit => Continuous Rotation S
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
Please be positive and constructive with your questions and comments.