Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revision Both sides next revision | ||
en:tinkering_kit_light_level_meter_with_driver [2016/12/08 17:51] odroid [Linux] |
en:tinkering_kit_light_level_meter_with_driver [2017/03/02 17:50] brian.kim [Python example] |
||
---|---|---|---|
Line 173: | Line 173: | ||
====== Python example ====== | ====== Python example ====== | ||
* [[https://github.com/hardkernel/WiringPi2-Python|WiringPi2-Python repository for ODROID]] | * [[https://github.com/hardkernel/WiringPi2-Python|WiringPi2-Python repository for ODROID]] | ||
- | **Prerequisites**: You must have //python-dev// and //python-setuptools// installed If you manually rebuild the bindings with swig-python wiringpi.i | + | 0. Requrements install |
+ | <code> | ||
+ | # sudo apt update | ||
+ | # sudo apt install python-dev python-setuptools swig3.0 | ||
+ | </code> | ||
1. Get/setup WiringPi 2 for Python repository | 1. Get/setup WiringPi 2 for Python repository | ||
Line 185: | Line 189: | ||
2. Build & install | 2. Build & install | ||
<code> | <code> | ||
- | # sudo python setup.py install | + | # ./build.sh |
+ | </code> | ||
+ | Or | ||
+ | <code> | ||
+ | # swig3.0 -python -threads wiringpi.i | ||
+ | # sudo python setup.py build install | ||
</code> | </code> | ||