Raspberry pi 3 GPIO with android

2,168 views
Skip to first unread message

wiss...@gmail.com

unread,
Oct 16, 2016, 3:53:20 PM10/16/16
to Android-rpi
Hello, is it possible to use Raspberry pi 3 GPIO with android OS? 

Igor Kalkov

unread,
Oct 17, 2016, 4:19:19 AM10/17/16
to Android-rpi
It should be possible. Did you check if the corresponding sysfs is available like the one on Linux?

Sergio

unread,
Oct 20, 2016, 4:01:15 PM10/20/16
to Android-rpi, wiss...@gmail.com

Hello, I'm looking for the same, I couldn't find the sysfs. Did you figured out how to do it?

Thien Pow Chong

unread,
Oct 24, 2016, 4:14:35 PM10/24/16
to Android-rpi, wiss...@gmail.com
the GPIO is connected as Serial Port.  so you need to develop the android app that check a serial connection via UsbManager... that will do.

wiss...@gmail.com

unread,
Oct 24, 2016, 4:28:50 PM10/24/16
to Android-rpi
Hello Thien, could you please vive US an exemple how to read and write into gpio? Thank you

Sergio

unread,
Nov 3, 2016, 11:33:39 AM11/3/16
to Android-rpi, wiss...@gmail.com
I been able to access the sys files through adb, here there's an example for another board but it works as well in the Rpi3
https://www.coursera.org/learn/internet-of-things-sensing-actuation/lecture/pKDxG/gpio-access-with-android

Igor Kalkov

unread,
Nov 3, 2016, 6:56:05 PM11/3/16
to Android-rpi, wiss...@gmail.com
@Sergio, which Android distribution did you test it with?

Sergio

unread,
Nov 3, 2016, 8:49:26 PM11/3/16
to Android-rpi, wiss...@gmail.com

mohan.ku...@gmail.com

unread,
Nov 10, 2016, 3:22:19 AM11/10/16
to Android-rpi, wiss...@gmail.com


On Monday, October 17, 2016 at 6:53:20 AM UTC+11, wiss...@gmail.com wrote:
Hello, is it possible to use Raspberry pi 3 GPIO with android OS? 

I installed a terminal emulator app (Termux) on pi 3 and executed the following:

#Pin 11 is GPIO17 (BCM numbering)

su
echo "17" >/sys/class/gpio/export
echo "out" > /sys/class/gpio/gpio17/direction
echo /sys/class/gpio/gpio17/value
echo 1 > /sys/class/gpio/gpio17/value
echo 0 > /sys/class/gpio/gpio17/value

Works like a treat. Next step would be to figure out how to do it in an Android app.




 

Igor Kalkov

unread,
Nov 10, 2016, 7:39:11 AM11/10/16
to Android-rpi, wiss...@gmail.com, mohan.ku...@gmail.com
We are working on a public API. I think it will take us a couple more weeks.
Until then you can just use Java FileInputStream / FileOutputStream to read the value file.

John Wong

unread,
Sep 28, 2017, 3:07:19 AM9/28/17
to Android-rpi


在 2016年11月10日星期四 UTC+8下午4:22:19,mohan.ku...@gmail.com写道:
Great!It's Work!

 

eduardo.m...@gmail.com

unread,
Mar 11, 2019, 5:10:19 PM3/11/19
to Android-rpi
https://developer.android.com/things/sdk/pio/gpio

I guess that works! Do you think that an app using this sdk could find raspberry pi 3 GPIOs?

alexan...@gmail.com

unread,
Oct 27, 2019, 8:32:07 AM10/27/19
to Android-rpi
The following sample worked on rpi3b+ with pie, including SELinux configuration.


https://github.com/yang-neu/rpi3gpio

Reply all
Reply to author
Forward
0 new messages