由于库adafruit_servokit一直在阻止我分配引脚,我一直在苦苦挣扎。当我尝试这样做时:
from adafruit_servokit import ServoKit # Servo library that works with Jetson
import RPi.GPIO as GPIO # Part of PWM DC motor control
GPIO.setmode(GPIO.BOARD) # Error here
它返回一个错误,说明:
Traceback (most recent call last):
File "brew.py", line 4, in <module>
GPIO.setmode(GPIO.BOARD)
File "/usr/lib/python3/dist-packages/Jetson/GPIO/gpio.py", line 317, in setmode
raise ValueError("A different mode has already been set!")
ValueError: A different mode has already been set!
我只需要一种方法来控制我的伺服系统并同时使用我的 GPIO 引脚。
我也愿意购买新零件。