Aria Rockchip RK3308 GPIO Control: Difference between revisions

From Ariaboard Wiki
Jump to navigation Jump to search
(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=== #...")
 
(No difference)

Latest revision as of 12:37, 15 July 2021

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