/OrangePi.GPIO

RPi.GPIO drop-in replacement library for Orange Pi 3 LTS Boards 64bit

Primary LanguageCMIT LicenseMIT

OrangePi.GPIO

This is a modified version of RPi.GPIO for Orange Pi Boards.

It is based on the original RPi.GPIO.

Manual Installation

sudo apt-get update
sudo apt-get install python3-dev git
git clone https://github.com/koguja/OrangePi.GPIO.git

if you receive error , try tutn off certificate control 
git config --global http.sslverify false

cd OrangePi.GPIO
sudo python3 setup.py install 
OR (for H6 boards Lite2, One Plus and "3"): 
sudo python3 setup.py install --force-h6

if you get an error try using this command:
sudo CFLAGS="-fcommon" python3 setup.py install --force-h6

Supported Boards

  • OPi Zero (as ZERO)
  • OPi Zero Plus (as ZEROPLUS)
  • OPi Zero Plus2 H3 (as ZEROPLUS2H3)
  • OPi Zero Plus2 H5 (as ZEROPLUS2H5)
  • OPi R1
  • OPi PC & PC Plus (as PCPCPLUS)
  • OPi One (as ONE)
  • OPi Lite (as LITE)
  • OPi PC2
  • OPi Prime (as PRIME)
  • OPi Lite2 (as LITE2)
  • OPi One Plus (as ONEPLUS)
  • OPi 3 (as THREE)

Usage

Same as RPi.GPIO but with a new function to choose OrangePi Board.

import OPi.GPIO as GPIO
GPIO.setboard(GPIO.ZEROPLUS)
GPIO.setmode(GPIO.BOARD)
GPIO.setup(5, GPIO.OUT)
GPIO.output(5, 1)

Many demo is on the example folder