amirxaniar post at 2017-11-8 05:39:59

RPi.GPIO on OPI lite

hey guys
how can i install RPI.GPIO lib on orange pi lite??

nopnop2002 post at 2017-11-8 10:42:44

Edited by nopnop2002 at 2017-11-9 21:13

Try this.

https://github.com/rm-hull/OPi.GPIO


This is for Opi-ZERO.


If you want to use this with Opi-PC/Opi-Lite/Opi-ONE,
You need update OPi/pin_mappings.py.

But i don't test it.

_pin_map = {
    # Physical pin to actual GPIO pin
    BOARD: {
      3: 12,
      5: 11,
      7: 6,
      8: 13,
      10: 14,
      11: 1,
      12: 110,
      13: 0,
      15: 3,
      16: 68,
      18: 71,
      19: 64,
      21: 65,
      22: 2,
      23: 66,
      24: 67,
      26: 21,
      27: 19,
      28: 18,
      29: 7,
      31: 8,
      32: 200,
      33: 9,
      35: 10,
      36: 201,
      37: 20,
      38: 198,
      40: 199
    },
    # BCM pin to actual GPIO pin
    BCM: {
      0: 19,
      1: 18,
      2: 12,
      3: 11,
      4: 6,
      5: 7,
      6: 8,
      7: 21,
      8: 67,
      9: 65,
      10: 64,
      11: 66,
      12: 200,
      13: 9,
      14: 13,
      15: 14,
      16: 201,
      17: 1,
      18: 110,
      19: 10,
      20: 198,
      21: 199,
      22: 3,
      23: 68,
      24: 71,
      25: 2,
      26: 20,
      27: 0
    },

EDIT:I tested.It's work fine.
git clone https://github.com/rm-hull/OPi.GPIO
cd OPi.GPIO
cp OPi/pin_mappings.py OPi/pin_mappings.py.org
vi OPi/pin_mappings.py
Edit above
sudo python setup.py install


page: [1]
View full version: RPi.GPIO on OPI lite