View: 6289|Reply: 2

OrangePi pls 2E Android GPIO not work

[Copy link]

1

threads

4

posts

21

credits

Novice

Rank: 1

credits
21
Published in 2017-1-18 17:35:55 | Show all floors |Read mode
i have OrangePi plus 2E i install Android OS and i try to gpio pin 13 on off but not working for me. i search google for gpio Android library didnt found. and i  see some video on youtube some one
do to gpio pin 13 work. my Android 4.2 is rooted i use terminal and get root access. the  code is ( echo 13 > /sys/class/gpio/export ) gpio pin connected LED 14 ground 13 is positive what i don its wrong or what is the problem ?  any one please HELP

1

threads

4

posts

21

credits

Novice

Rank: 1

credits
21
 Author| Published in 2017-1-18 17:40:52 | Show all floors
UPDATE

pin 13 to 14 have 3v dc LED was on always can't off

1

threads

6

posts

29

credits

Novice

Rank: 1

credits
29
Published in 2017-7-7 13:45:14 | Show all floors
First of all you have to have root to use GPIO under Android.
In Android terminal go root:
  1. su
Copy code

Then, you make handler for GPIO port manually:
  1. echo 13 > /sys/class/gpio/export
Copy code

Then you set GPIO mode on this pin to OUT (may be IN) by typping:
  1. echo "out" > /sys/class/gpio/gpio13/direction
Copy code

Then make this GPIO pin active by typping:
  1. echo 1 > /sys/class/gpio/gpio13/value
Copy code

To make it inactive just type:
  1. echo 0 > /sys/class/gpio/gpio13/value
Copy code


Hope this helps
You need to log in before you can reply login | Register

Points Rule

Quick reply Top Return list