Use my fork of the Wiring-Pi Python library which checks out the WiringOP fork of the WiringPi library as a submodule to build everything. yes that's a little confusing
The WiringPI library is the original C library that RaspGPIO is somewhat based on. WiringPi was built to replicate arduino GPIO functions
In Raspberry Pi Land there are 2 normal python paths for GPIO. One is Raspi.GPIO and the other is WiringPI
I built this on an Orange Pi One running Armbian Jessie
WiringOP is a fork of the Banana Pi fork of the WiringPI Library
https://github.com/zhaolei/WiringOP
WiringPi-Python is python binding to the C library. The github release uses a submodule and checks out the WiringPi library directly. My fork updates the submodule ot the wiringOP library, and removes a few incompatible includes that keeps the python library from building
https://github.com/lanefu/WiringPi-Python-OP
# install build requirements
sudo apt-get install python-dev python-setuptools swig -y
# download my fork of the wiringpy-python build that contains submodile to wiringOP library
git clone --recursive https://github.com/lanefu/WiringPi-Python-OP.git
# build C and install both Wiring Pi C library and Python
cd WiringPi-Python-OP
cd WiringPi/
sudo ./build
cd ..
export CFLAGS="-lwiringPi -lwiringPiDev"
swig2.0 -python wiringpi.i
sudo python setup.py install
# enable gpio kernel module
sudo sed -i 's/\#gpio_sunxi/gpio_sunxi/g' /etc/modules
sudo modprobe gpio_sunxi
So it would be really nice if you could provide some examples of use (maybe geared to iot) for example stdin from some terminal app display on a i2c lcd display (with that pcf i2c backpack)?
What about that smbus python package which is meant for i2c, does that work on orange-pi? How do I know when I see a python project dealing with hardware that I know it works with orange pi? The ones with "import RPi.GPIO as GPIO" all are incompatible right? How do I port WiringOPI to them?