Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
en:tinkering_kit_light_level_meter_with_driver [2015/12/02 17:05] brian.kim [Schematic] |
en:tinkering_kit_light_level_meter_with_driver [2017/04/01 08:29] odroid [Python example] |
||
---|---|---|---|
Line 22: | Line 22: | ||
[[http://www.hardkernel.com/main/products/prdt_info.php?g_code=G141637532784|Where to buy]] | [[http://www.hardkernel.com/main/products/prdt_info.php?g_code=G141637532784|Where to buy]] | ||
- | |||
- | ====== Schematic ====== | ||
- | |||
- | {{:en:tinkeringkitdriverleds.png?800|}} | ||
====== DIY light level meter project ====== | ====== DIY light level meter project ====== | ||
Line 32: | Line 28: | ||
Light Level Meter schematic | Light Level Meter schematic | ||
- | {{:en:c1:tinkering.jpg?500|}} | + | {{:en:tinkeringkitdriverleds.png?800|}} |
- | 2. Get the wiringPi library compatible **ODROID-C1** | + | 2. Get the wiringPi library compatible **ODROID** |
<code> | <code> | ||
# git clone https://github.com/hardkernel/wiringPi | # git clone https://github.com/hardkernel/wiringPi | ||
Line 175: | Line 171: | ||
</file> | </file> | ||
- | == 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 |
- | + | ||
- | 0. Get/setup WiringPi library (//If you already installed WiringPi library, skip this step.//) | + | |
<code> | <code> | ||
- | # git clone https://github.com/hardkernel/wiringPi.git | + | # sudo apt update |
- | # cd wiringPi | + | # sudo apt install python-dev python-setuptools swig3.0 |
- | # sudo ./build | + | |
</code> | </code> | ||
+ | |||
1. Get/setup WiringPi 2 for Python repository | 1. Get/setup WiringPi 2 for Python repository | ||
<code> | <code> | ||
# git clone https://github.com/hardkernel/WiringPi2-Python.git | # git clone https://github.com/hardkernel/WiringPi2-Python.git | ||
# cd WiringPi2-Python | # cd WiringPi2-Python | ||
+ | # git submodule init | ||
+ | # git submodule update | ||
</code> | </code> | ||
2. Build & install | 2. Build & install | ||
<code> | <code> | ||
- | # sudo python setup.py install | + | # ./build.sh |
</code> | </code> | ||
+ | Or | ||
+ | <code> | ||
+ | # swig3.0 -python -threads wiringpi.i | ||
+ | # sudo python setup.py build install | ||
+ | </code> | ||
+ | |||
+ | |||
+ | **[[http://odroid.com/dokuwiki/doku.php?id=en:xu3_hardware_gpio#gpio_map_for_wiringpi_library_con10_2_x_15|WiringPi Pin Map]]** | ||
+ | |||
3. Run the example source code | 3. Run the example source code |