Last modified by Xiaoling on 2023/06/01 17:01

From version 9.1
edited by Edwin Chen
on 2022/05/03 08:59
Change comment: There is no comment for this version
To version 6.1
edited by Edwin Chen
on 2022/05/03 08:54
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -24,7 +24,7 @@
24 24  
25 25  (% class="box infomessage" id="HControlanGeneralGPIO:" %)
26 26  (((
27 -**Control a General GPIO:**
27 +Control an General GPIO:
28 28  
29 29  **echo 18 > /sys/class/gpio/export**     ~/~/ Export gpio 18 so we can use it
30 30  **echo "high" > /sys/class/gpio/gpio18/direction**   ~/~/  Set direction to out and
... ... @@ -36,12 +36,4 @@
36 36  **cat  /sys/class/gpio/gpio18/value**  ~/~/ Get GPIO18 value if set input
37 37  )))
38 38  
39 -(% class="box infomessage" %)
40 -(((
41 -**Control a GPIO already exported as SYSTEM LEDs .**
42 -**echo 1 > /sys/class/leds/dragino2\:red\:system/brightness**  ~/~/ Turn On LED dragino2:red:system
43 -**echo 0 > /sys/class/leds/dragino2\:red\:system/brightness**  ~/~/ Turn off LED dragino2:red:system
44 -)))
45 -
46 -
47 47  Reference: [[http:~~/~~/www.avrfreaks.net/wiki/index.php/Documentation:Linux/GPIO#gpio-sysfs>>url:http://www.avrfreaks.net/wiki/index.php/Documentation:Linux/GPIO#gpio-sysfs]]