Aria Rockchip RK3308 GPIO Control

From Ariaboard Wiki
Revision as of 22:37, 14 July 2021 by Wangshuyi (talk | contribs) (Created page with "==Control GPIO via Shell== To control GPIO3_A5, we need to control on gpio101 (32*3+0*8+5 = 101) *['''A->0'''] *['''B->1'''] *['''C->2'''] *['''D->3'''] ===export gpio=== #...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Control GPIO via Shell

To control GPIO3_A5, we need to control on gpio101 (32*3+0*8+5 = 101)

  • [A->0]
  • [B->1]
  • [C->2]
  • [D->3]

export gpio

# echo 101 > /sys/class/gpio/export #export the pin
# echo out > /sys/class/gpio/gpio101/direction #set direction, out or in

on and off

# echo 1 > /sys/class/gpio/gpio101/value #on
# echo 0 > /sys/class/gpio/gpio101/value #off