GPIO.setmode(GPIO.BOARD) Error
The Servo PWM Pi is a 16-channel, 12-bit PWM controller for driving LEDs and RC servos on the Raspberry Pi
19/05/2020
Posted by:
user387283
ValueError: A different mode has already been set!
I am confused as to why this is happening since in my code I am not even using the RPi.GPIO class and therefore not setting the mode for the GPIO before this instance.
19/05/2020
Posted by:
andrew
The error you are getting normally occurs if the GPIO mode has already been set by another program on the Raspberry Pi. I am not sure why you are getting the error if you have not used the RPi.GPIO class elsewhere.
I have updated the Servo Pi library to make it check to see if the GPIO mode has already been set and if it has, use the selected GPIO mode. Hopefully, this will fix the error that you are getting.
You can download a new version of the Servo Pi library from our GitHub repository at Servo Pi GitHub Repository
Forum Notice – Closure to New Posts
As part of our compliance with the UK’s Online Safety Act, the AB Electronics UK support forum is now closed to new posts and replies.
We understand the importance of continued support for our products, so if you have a technical query or require assistance, please use the Contact Form or consult our Knowledge Base for helpful articles and documentation.
We appreciate your understanding and continued support.
Note: documents in Portable Document Format (PDF) require Adobe Acrobat Reader 5.0 or higher to view.
Download Adobe Acrobat Reader or other PDF reading software for your computer or mobile device.