OPi.GPIO
OPi.GPIO copied to clipboard
How exactly to port this library?
I'm fairly new to this domain, so please bear with me with some "so obvious to you" questions. :-)
This is a drop-in replacement lib for RPi.GPIO. But how exactly should I port this new lib for OPi? Should I install RPi library first as normally would do, then install this new lib as described in doc $ sudo pip install --upgrade OPi.GPIO
? Thanks!
You don't need to install the RPi.GPIO library first, just do the pip install.
I originally wrote the library so that I could use existing code (that used RPi.GPIO) on the Orange Pi Zero without having to change to much of the internals. This is why there are BCM mappings. If you are embarking on a new idea just for OPi, then I would suggest you just target the SUNXI mappings (or whichever are appropriate for your device - note that other folks have contributed mappings for a few other SBCs)