please choosego to mobile | Continue to access the PC version
View: 6733|Reply: 1

RPi.GPIO on OPI lite

[Copy link]

2

threads

2

posts

14

credits

Novice

Rank: 1

credits
14
Published in 2017-11-8 05:39:59 | Show all floors |Read mode
hey guys
how can i install RPI.GPIO lib on orange pi lite??

10

threads

218

posts

2040

credits

Gold member

Rank: 6Rank: 6

credits
2040
Published in 2017-11-8 10:42:44 | Show all floors
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


You need to log in before you can reply login | Register

Points Rule

Quick reply Top Return list