Merge pull request #16 from corbanmailloux/patch-1

Increase readability of install commands.
This commit is contained in:
Philip Howard
2015-03-30 09:07:35 +01:00

View File

@@ -14,20 +14,23 @@ You **must** have python-dev and python-setuptools installed
If you manually rebuild the bindings with swig -python wiringpi.i If you manually rebuild the bindings with swig -python wiringpi.i
YOU MUST FIRST INSTALL WIRINGPI2!! YOU MUST FIRST INSTALL WIRINGPI2!!
```bash
git clone git://git.drogon.net/wiringPi git clone git://git.drogon.net/wiringPi
cd wiringPi cd wiringPi
sudo ./build sudo ./build
```
**Get/setup repo:** **Get/setup repo:**
```bash
git clone https://github.com/Gadgetoid/WiringPi2-Python.git git clone https://github.com/Gadgetoid/WiringPi2-Python.git
cd WiringPi2-Python cd WiringPi2-Python
```
**Build & install with:** **Build & install with:**
sudo python setup.py install `sudo python setup.py install`
Or Python 3 Or Python 3:
sudo python3 setup.py install `sudo python3 setup.py install`
**Class-based Usage:** **Class-based Usage:**
Description incoming! Description incoming!
@@ -37,11 +40,12 @@ Description incoming!
import wiringpi2 import wiringpi2
wiringpi2.wiringPiSetup() # For sequential pin numbering, one of these MUST be called before using IO functions wiringpi2.wiringPiSetup() # For sequential pin numbering, one of these MUST be called before using IO functions
OR # OR
wiringpi2.wiringPiSetupSys() # For /sys/class/gpio with GPIO pin numbering wiringpi2.wiringPiSetupSys() # For /sys/class/gpio with GPIO pin numbering
OR # OR
wiringpi2.wiringPiSetupGpio() # For GPIO pin numbering wiringpi2.wiringPiSetupGpio() # For GPIO pin numbering
Setting up IO expanders (This example was tested on a quick2wire board with one digital IO expansion board connected via I2C): Setting up IO expanders (This example was tested on a quick2wire board with one digital IO expansion board connected via I2C):
wiringpi2.mcp23017Setup(65,0x20) wiringpi2.mcp23017Setup(65,0x20)