PINE64
API for controlling GPIO pins from Android apps - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: PINE A64(+) (https://forum.pine64.org/forumdisplay.php?fid=4)
+--- Forum: Android on Pine A64(+) (https://forum.pine64.org/forumdisplay.php?fid=5)
+--- Thread: API for controlling GPIO pins from Android apps (/showthread.php?tid=207)



API for controlling GPIO pins from Android apps - Ghost - 01-26-2016

Backer Per-Jarle Sæther would like to know:

"Do you have an API for controlling GPIO pins from Android apps? 

I would like to make my own apps for controlling the GPIO pins. Would be awesome if this could be possible from java apps without the need for native coding."

Can anyone offer any help?


RE: API for controlling GPIO pins from Android apps - tllim - 01-26-2016

(01-26-2016, 07:49 AM)SkairkrohBule Wrote: Backer Per-Jarle Sæther would like to know:

"Do you have an API for controlling GPIO pins from Android apps? 

I would like to make my own apps for controlling the GPIO pins. Would be awesome if this could be possible from java apps without the need for native coding."

Can anyone offer any help?

Not yet, this is work in progress. However, we use similar method to test GPIO pin functionality at production floor in factory.


RE: API for controlling GPIO pins from Android apps - SpecterXP - 02-26-2016

This is actually why I joined the forum. I want to be able to have Android accept input from a set of GPIO ports and automatically initiate a proper shutdown/startup sequence. I want to build a CarPC with this because it's a lot better than the RPi2 I'm using right now.

I'm using the Mausberry 3A switch (link below) to provide power to everything only when the car is turned on. It send signals to the GPIO pins to initiate the proper shutdown and startup. I'm hoping to be able to incorporate this in Android and the Pine64.

http://www.mausberrycircuits.com/collections/car-power-supply-switches/products/3a-car-supply-switch

Well, doing a little more research I found that we have an EXP Connector now that's not on the schematic I have printed out. I found the updated pinout on the wiki (https://drive.google.com/file/d/0B0cEs0lxTtL3YU1CNmJ2bEIzTlE/view) that shows hardware pins that allow for a power and reset switch that is integrated into the Android image. Perfect. Looks like this will work flawlessly right out of the box. This is turning out to be one of the best boards on the market as you don't need to waist a GPIO pin for a power switch.


RE: API for controlling GPIO pins from Android apps - tllim - 02-27-2016

(02-26-2016, 09:36 AM)SpecterXP Wrote: This is actually why I joined the forum. I want to be able to have Android accept input from a set of GPIO ports and automatically initiate a proper shutdown/startup sequence. I want to build a CarPC with this because it's a lot better than the RPi2 I'm using right now.

I'm using the Mausberry 3A switch (link below) to provide power to everything only when the car is turned on. It send signals to the GPIO pins to initiate the proper shutdown and startup. I'm hoping to be able to incorporate this in Android and the Pine64.

http://www.mausberrycircuits.com/collections/car-power-supply-switches/products/3a-car-supply-switch

Well, doing a little more research I found that we have an EXP Connector now that's not on the schematic I have printed out. I found the updated pinout on the wiki (https://drive.google.com/file/d/0B0cEs0lxTtL3YU1CNmJ2bEIzTlE/view) that shows hardware pins that allow for a power and reset switch that is integrated into the Android image. Perfect. Looks like this will work flawlessly right out of the box. This is turning out to be one of the best boards on the market as you don't need to waist a GPIO pin for a power switch.

EXP circuit is on the schematic.


RE: API for controlling GPIO pins from Android apps - SpecterXP - 02-29-2016

tllim:
You mean this? Because I can't seem to locate it on that image. However, it is on the other one I posted. That's why I re-posted. I didn't want to make it seem like I couldn't find something for myself, and wanted to make sure others could find it if they searched. Big Grin

http://wiki.pine64.org/images/7/7d/Pine64_Board_Connector.png


RE: API for controlling GPIO pins from Android apps - tllim - 02-29-2016

(02-29-2016, 01:57 PM)SpecterXP Wrote: tllim:
You mean this? Because I can't seem to locate it on that image. However, it is on the other one I posted. That's why I re-posted. I didn't want to make it seem like I couldn't find something for myself, and wanted to make sure others could find it if they searched. Big Grin

http://wiki.pine64.org/images/7/7d/Pine64_Board_Connector.png

The EXT pin definition listed on page 3 under Pine64 wiki site

https://drive.google.com/a/pine64.com/file/d/0B0cEs0lxTtL3YU1CNmJ2bEIzTlE/view?usp=sharing