OPi.GPIO icon indicating copy to clipboard operation
OPi.GPIO copied to clipboard

How exactly to port this library?

Open Hazeline2018 opened this issue 6 years ago • 1 comments

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!

Hazeline2018 avatar Jan 29 '19 03:01 Hazeline2018

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)

rm-hull avatar Jan 29 '19 08:01 rm-hull