3225 Views - Created 19/05/2020
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.
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 https://github.com/abelectronicsuk/ABElectronics_Python_Libraries/blob/master/ServoPi/ServoPi.py
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.