From 857abc2d6f5ad4111927977ffe939ed8aeb975ea Mon Sep 17 00:00:00 2001 From: Tony Zhang Date: Mon, 2 Feb 2015 18:51:19 +0800 Subject: [PATCH] Edit the readme file. Signed-off-by: Tony Zhang --- README.md | 39 +++++++++++++++++++++++++++++++++++++++ README.txt | 21 --------------------- setup.py | 2 +- 3 files changed, 40 insertions(+), 22 deletions(-) create mode 100644 README.md delete mode 100644 README.txt diff --git a/README.md b/README.md new file mode 100644 index 0000000..59e4216 --- /dev/null +++ b/README.md @@ -0,0 +1,39 @@ +RPi.GPIO_BP README + +This is a modified version RPi.GPIO for Banana Pro/Pi. We call it RPi.GPIO_BP. +It is based on the original [RPi.GPIO](https://pypi.python.org/pypi/RPi.GPIO). +The modification is done by [LeMaker](http://lemaker.org). The RPi.GPIO_BP API usage are the same to the original RPi.GPIO. +You can donwload the RPi.GPIO_BP from: +https://github.com/LeMaker/RPi.GPIO_BP. + +## Download +### For Banana Pro + git clone https://github.com/LeMaker/RPi.GPIO_BP -b bananapro +### For Banana Pi + git clone https://github.com/LeMaker/RPi.GPIO_BP -b bananapi +## Installation + sudo apt-get update + sudo apt-get install python-dev + cd /RPi.GPIO_BP + python setup.py install + sudo python setup.py install + +Please be attention that you need use both python and sudo pytohn to make the RPi.GPIO_BP work well. + +## Examples +You can go to LeMaker wiki to see the basic examples: http://wiki.lemaker.org/RPi.GPIO + +And the source directory test also has many demo. + +## Extra +This version supports a new addressing mode "RAW" which enables you to use any GPIO pin. Below is an example which sets PD10 (which is pin 29 on the LCD connector) to a high level. + + import RPi.GPIO as GPIO + GPIO.setmode(GPIO.RAW) + GPIO.setup(GPIO.PD+10, GPIO.OUT) + GPIO.output(GPIO.PD+10, 1) + + +Thanks! + +LeMaker Team diff --git a/README.txt b/README.txt deleted file mode 100644 index c7f8b0d..0000000 --- a/README.txt +++ /dev/null @@ -1,21 +0,0 @@ -RPi.GPIO_BP -=========== - -This a modified version RPi.GPIO for Banana Pi. The original version for Raspberry Pi can be find from https://pypi.python.org/pypi/RPi.GPIO. The api fucntion isntruction can also refer to http://sourceforge.net/p/raspberry-gpio-python/wiki/Home/ . - -************* How to install RPi.GPIO library for Banana Pi************* - -1. sudo apt-get update -2. sudo apt-get install python-dev ==> I just try python 2.7.x, did not try 3.x.x -3. cd RPi.GPIO_BP -4. python setup.py install ===> Attention: do this step for /build folder is the user permission not root permission -5. sudo python setup.py install ==> generate GPIO.so - -The modified RPi.GPIO for Banana Pi is powered by LeMaker < http://www.lemaker.org/ > . - -This version supports a new addressing mode "RAW" which enables you to use any GPIO pin. Below is an example which sets PD10 (which is pin 29 on the LCD connector) to a high level. - -import RPi.GPIO as GPIO -GPIO.setmode(GPIO.RAW) -GPIO.setup(GPIO.PD+10, GPIO.OUT) -GPIO.output(GPIO.PD+10, 1) \ No newline at end of file diff --git a/setup.py b/setup.py index 9bc71f9..9f2b948 100644 --- a/setup.py +++ b/setup.py @@ -38,7 +38,7 @@ author = 'Ben Croston', author_email = 'ben@croston.org', description = 'A module to control Raspberry Pi GPIO channels', - long_description = open('README.txt').read() + open('CHANGELOG.txt').read(), + long_description = open('CHANGELOG.txt').read(), license = 'MIT', keywords = 'Raspberry Pi GPIO', url = 'http://sourceforge.net/projects/raspberry-gpio-python/',