Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
old_product:odroid-xu3:hardware:xu3_enhancement_gpio30 [2017/07/06 09:56]
luke.go ↷ Page moved from odroid-xu3_4:hardware:xu3_enhancement_gpio30 to odroid-xu3_4:hardware:xu3:xu3_enhancement_gpio30
old_product:odroid-xu3:hardware:xu3_enhancement_gpio30 [2017/07/26 18:10]
luke.go ↷ Page moved from old_product:odroid-xu3:hardware:xu3:xu3_enhancement_gpio30 to old_product:odroid-xu3:hardware:xu3_enhancement_gpio30
Line 6: Line 6:
  
 ** 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 ​bash target> sudo su </​code>​
 \\ \\ \\ \\ \\ \\
  
Line 12: Line 12:
 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.\\
-[[odroid-xu3_4:​hardware:​xu3_hardware#​expansion_connectors| Pin description]]+[[old_product:​odroid-xu3:hardware:xu3:​xu3_hardware#​expansion_connectors| Pin description]]
  
 Create a GPIO file access.\\ Create a GPIO file access.\\
 You can access GPIOs using sysfs interface. You can access GPIOs using sysfs interface.
-  ​echo 29 > /​sys/​class/​gpio/​export+<code bash target>​ 
 +echo 29 > /​sys/​class/​gpio/​export 
 +</​code>​
 Configure the pin direction (in/out) Configure the pin direction (in/out)
-  ​echo in > /​sys/​class/​gpio/​gpio29/​direction+<code bash target>​ 
 +echo in > /​sys/​class/​gpio/​gpio29/​direction 
 +</​code>​
 Read a value Read a value
-  ​cat /​sys/​class/​gpio/​gpio29/​value+<code bash target>​ 
 +cat /​sys/​class/​gpio/​gpio29/​value 
 +</​code>​
  
 {{http://​dn.odroid.com/​homebackup/​201310211155385344.jpg}}\\ {{http://​dn.odroid.com/​homebackup/​201310211155385344.jpg}}\\
Line 31: Line 37:
 For example, The NET name of D1 is INT23.\\ For example, The NET name of D1 is INT23.\\
 According to below link, The Export GPIO number is #31.\\ According to below link, The Export GPIO number is #31.\\
-[[odroid-xu3_4:​hardware:​xu3_hardware#​expansion_connectors| Pin description]] +[[old_product:​odroid-xu3:hardware:xu3:​xu3_hardware#​expansion_connectors| Pin description]] 
- +<code bash target> 
-  echo 31 > /​sys/​class/​gpio/​export +echo 31 > /​sys/​class/​gpio/​export 
-  echo out > /​sys/​class/​gpio/​gpio31/​direction+echo out > /​sys/​class/​gpio/​gpio31/​direction 
 +</​code>​
 LED ON LED ON
-  ​echo 1 > /​sys/​class/​gpio/​gpio31/​value+<code bash target>​ 
 +echo 1 > /​sys/​class/​gpio/​gpio31/​value 
 +</​code>​
 LED OFF LED OFF
-  ​echo 0 > /​sys/​class/​gpio/​gpio31/​value+<code bash target>​ 
 +echo 0 > /​sys/​class/​gpio/​gpio31/​value 
 +</​code>​
   ​   ​