-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Orange Pi One and Orange Pi Lite (#30)
* Add missing 13th PIN for Orange Pi PC * Add Orange Pi One and Orange Pi Lite * Replace tab with space
- Loading branch information
1 parent
8af74e4
commit f8af08e
Showing
3 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright (c) 2018 Richard Hull & Contributors | ||
# See LICENSE.md for details. | ||
|
||
""" | ||
Alternative pin mappings for Orange PI Lite | ||
(see http://linux-sunxi.org/images/8/88/Orange_pi-lite-v1_1.pdf) | ||
Usage: | ||
.. code:: python | ||
import orangepi.lite | ||
from OPi import GPIO | ||
GPIO.setmode(orangepi.lite.BOARD) or GPIO.setmode(orangepi.lite.BCM) | ||
""" | ||
|
||
# pin number = (position of letter in alphabet - 1) * 32 + pin number | ||
# So, PD14 will be (4 - 1) * 32 + 14 = 110 | ||
|
||
import orangepi.pc | ||
|
||
# Orange Pi One physical board pin to GPIO pin | ||
BOARD = orangepi.pc.BOARD | ||
|
||
# Orange Pi One BCM pin to actual GPIO pin | ||
BCM = orangepi.pc.BCM |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright (c) 2018 Richard Hull & Contributors | ||
# See LICENSE.md for details. | ||
|
||
""" | ||
Alternative pin mappings for Orange PI One | ||
(see http://linux-sunxi.org/images/7/7e/ORANGE_PI-ONE-V1_1.pdf) | ||
Usage: | ||
.. code:: python | ||
import orangepi.one | ||
from OPi import GPIO | ||
GPIO.setmode(orangepi.one.BOARD) or GPIO.setmode(orangepi.one.BCM) | ||
""" | ||
|
||
# pin number = (position of letter in alphabet - 1) * 32 + pin number | ||
# So, PD14 will be (4 - 1) * 32 + 14 = 110 | ||
|
||
import orangepi.pc | ||
|
||
# Orange Pi One physical board pin to GPIO pin | ||
BOARD = orangepi.pc.BOARD | ||
|
||
# Orange Pi One BCM pin to actual GPIO pin | ||
BCM = orangepi.pc.BCM |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters