maximus1127
Posts: 6
Joined: Tue Apr 23, 2019 1:48 pm

Access GPIO from Pi running Android OS

Mon Apr 27, 2020 12:06 pm

Hi, I've searched many forums but I can't seem to find an answer for this. I want to run a unity game on Rpi. I know I have to do this by installing android on the Pi. No problem. However, I want to also access the GPIO functionality of the Pi to send some peripheral commands based on the player's environment (light up an LED when they enter a well lit room, trigger a fan when they walk around a corner and a breeze is blowing, etc). However, I don't even know if it's possible to access the GPIO when running the pi in android OS as all the GPIO tutorials/code snippets that I can find are written in python. I just don't know how to combine the two technologies: android + python, to get the desired effect. Any help or direction is much appreciated. Perhaps there's a library that I don't know about? Or a different approach all together that I should consider?

fruitoftheloom
Posts: 23132
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Access GPIO from Pi running Android OS

Mon Apr 27, 2020 12:14 pm

maximus1127 wrote:
Mon Apr 27, 2020 12:06 pm
Hi, I've searched many forums but I can't seem to find an answer for this. I want to run a unity game on Rpi. I know I have to do this by installing android on the Pi. No problem. However, I want to also access the GPIO functionality of the Pi to send some peripheral commands based on the player's environment (light up an LED when they enter a well lit room, trigger a fan when they walk around a corner and a breeze is blowing, etc). However, I don't even know if it's possible to access the GPIO when running the pi in android OS as all the GPIO tutorials/code snippets that I can find are written in python. I just don't know how to combine the two technologies: android + python, to get the desired effect. Any help or direction is much appreciated. Perhaps there's a library that I don't know about? Or a different approach all together that I should consider?

viewtopic.php?f=73&t=258302
Last edited by fruitoftheloom on Mon Apr 27, 2020 12:16 pm, edited 1 time in total.
Rather than negativity think outside the box !
RPi 4B 4GB (SSD Boot)..
Asus ChromeBox 3 Celeron is my other computer...

maximus1127
Posts: 6
Joined: Tue Apr 23, 2019 1:48 pm

Re: Access GPIO from Pi running Android OS

Mon Apr 27, 2020 12:16 pm

Thanks for the fast reply! Is that an android library? I know nothing about android or java at all. I'm skilled in C# (unity) and python. Will using that library mentioned in that link require me to learn java?

Return to “Android”