Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
en:c1_enhancement_gpio40 [2016/03/08 16:37] charles.park |
en:c1_enhancement_gpio40 [2016/03/08 16:47] charles.park |
||
---|---|---|---|
Line 2: | Line 2: | ||
The **ODROID-C2** provides 40Pin GPIOs. | The **ODROID-C2** provides 40Pin GPIOs. | ||
- | **Easy to use GPIOs**\\ | + | **Easy to use GPIOs** \\ |
- | First, you refer to below link.\\ | + | First, you refer to below link. \\ |
- | You check Export number that you want to use GPIO.\\ | + | You check Export number that you want to use GPIO. \\ |
[[en:c2_hardware&#expansion_connectors | Pin description]] | [[en:c2_hardware&#expansion_connectors | Pin description]] | ||
- | ** You need to enter into super-user mode first to run below commands !! **\\ | + | ** You need to enter into super-user mode first to run below commands !! ** |
<code> sudo su </code> | <code> sudo su </code> | ||
- | \\ \\ \\ | ||
- | |||
Create a GPIO file access.\\ | Create a GPIO file access.\\ | ||
Line 16: | Line 14: | ||
echo 233 > /sys/class/gpio/export | echo 233 > /sys/class/gpio/export | ||
Configure the pin direction (in/out) | Configure the pin direction (in/out) | ||
- | echo in > /sys/class/gpio/gpio29/direction : gpio direction input | + | echo in > /sys/class/gpio/gpio233/direction : gpio direction input |
- | echo out > /sys/class/gpio/gpio29/direction : gpio direction output | + | echo out > /sys/class/gpio/gpio233/direction : gpio direction output |
Read a value (if gpio direction is input) | Read a value (if gpio direction is input) | ||
cat /sys/class/gpio/gpio233/value | cat /sys/class/gpio/gpio233/value |