Please select To the mobile version | Continue to access the desktop computer version

OrangePi

 Login            
 Register            
Search
Hot search: orangepi
View: 2219|Reply: 1

RPi.GPIO on OPI lite

[Copy link]

2

Threads

2

Posts

14

Credits

Novice

Rank: 1

Credits
14
Post time 2017-11-8 05:39:59 | Show all posts |Read mode
hey guys
how can i install RPI.GPIO lib on orange pi lite??

10

Threads

220

Posts

1984

Credits

Gold member

Rank: 6Rank: 6

Credits
1984
Post time 2017-11-8 10:42:44 | Show all posts
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 have to log in before you can reply Login | Register

Points Rules

Archiver|Mobile edition|Darkroom|OrangePi En ( 粤ICP备14086627号-2

2019-9-19 14:46 GMT+8 , Processed in 0.029443 second(s), 22 queries .

Powered by Discuz! X3.2

© 2014-2015 orangepibbs en.

Quick Reply To Top Return to the list