PINE64

Full Version: Potential use for Euler Bus/PI-2-bus
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Forgive my ignorance, but I have little experience with hardware "hacking" and had a few questions that endless searches through the forums could not answer... 

1) What exactly can I do with the buses on the Pine64/how do I actually go about using them? 

2) Would I be able to directly wire an Xbox 360 controller to one of these buses, thereby freeing up a USB port and/or the bluetooth connection?

3) How much programming/how possible would it be to modify Android to allow for controller interaction with the Android UI? For example, use the D-Pad to select apps on Android's home screen?

Again, pardon my ignorance, I am only taking the first baby steps in this field and would love any and all direction from you guys!

Thank you!
(10-05-2016, 04:52 PM)xxvolwarexx Wrote: [ -> ]1) What exactly can I do with the buses on the Pine64/how do I actually go about using them? 

The bus GPIO pins can be used for things like turning stuff on and off, or communication with other devices to add more functionality to the pine64 board, or to allow it to interact with tht outside world. For example, it should be possible to use a NRF24L01 radio transeiver module with the pine64 RPi bus, allowing the pine64 to receive sensor readings from a NRF24L01 based sensor network. Or it might have a series of led lights hooked up to the pine64, and you can turn them on and off via code, or have the pine64 turn them on and off to indicate different things. Think of the busses as allowing the processor on the pine64 to interact with other devices, but you need to put a bit of thinking and legwork in to make it so it can do it.

(10-05-2016, 04:52 PM)xxvolwarexx Wrote: [ -> ]2) Would I be able to directly wire an Xbox 360 controller to one of these buses, thereby freeing up a USB port and/or the bluetooth connection?

I'm not familiar with this side of things, but I would suspect not it if it is a usb connection. If the number of ports was an issue, it would be much simpler and easier to use a USB bub.

(10-05-2016, 04:52 PM)xxvolwarexx Wrote: [ -> ]3) How much programming/how possible would it be to modify Android to allow for controller interaction with the Android UI? For example, use the D-Pad to select apps on Android's home screen?

There is currently no support on Android for controlling the GPIO pins. I believe it has been discussed as a desired feature, and will probably eventuate, but I haven't seen anything yet indicating it is being worked on. Hopefully it will eventuate, as it would be another market the pine64 could capture, as I'm not aware of any other boards (other than the RIoTboard - and that was only limited) running Android have done this either.
(10-05-2016, 04:52 PM)xxvolwarexx Wrote: [ -> ]3) How much programming/how possible would it be to modify Android to allow for controller interaction with the Android UI? For example, use the D-Pad to select apps on Android's home screen?

Not sure how true this is of other controllers, but if I plug my wired Xbox 360 pad into my Pine (via USB), it auto-detects and allows me to choose and control apps from the home screen. To be clear, it doesn't allow cursor/mouse-type control, but when you push a direction on the analogue stick or d-pad, it highlights each app in turn. The A button selects and the B button cancels.
(10-05-2016, 06:28 PM)pfeerick Wrote: [ -> ]There is currently no support on Android for controlling the GPIO pins. I believe it has been discussed as a desired feature, and will probably eventuate, but I haven't seen anything yet indicating it is being worked on. Hopefully it will eventuate, as it would be another market the pine64 could capture, as I'm not aware of any other boards (other than the RIoTboard - and that was only limited) running Android have done this either.

Acutually , ayufan's (7) build does GPIO in sysfs just as well as the gnu+linux distros. A little known fact , actually Android has 'always' been able to do GPIO and all that needed to happen was set an option for the kernel compile; that's it !

I asked ayufan to set the option with compile|test a couple of weeks ago , and voila success !

So, in ayufan's build of Android 7 we have /sys/class/gpio/+   which works just as it does in gnu+linux. You can access the GPIO in Java and C also, if you are a conversant Droid developer. If you have the rooted version ( I think they all are ) you can use a terminal emulation program like "Better Terminal Pro" to set the various pins on|off with the normal sysfs commands.
(10-06-2016, 07:56 AM)MarkHaysHarris777 Wrote: [ -> ]Acutually , ayufan's (7) build does GPIO in sysfs just as well as the gnu+linux distros. A little known fact , actually Android has 'always' been able to do GPIO and all that needed to happen was set an option for the kernel compile; that's it !

Thanks for that Marcus, good to know the Android 7 build has finally enabled that. Smile I should probably have been clearer above above as I was referring to APP support... the kernel has always support GPIO access as long as the correct bits set. It's just since user access to the GPIOs isn't that common, that I don't think anyone has written any apps to let you do it. Hence why I hope the pine64 can be the first to promote that, as with a properly enabled kernel, and a current Andoid build, having a nice touch-screen app to access the GPIO would be a real nice feather in it's cap!
(10-06-2016, 07:56 AM)MarkHaysHarris777 Wrote: [ -> ]
(10-05-2016, 06:28 PM)pfeerick Wrote: [ -> ]There is currently no support on Android for controlling the GPIO pins. I believe it has been discussed as a desired feature, and will probably eventuate, but I haven't seen anything yet indicating it is being worked on. Hopefully it will eventuate, as it would be another market the pine64 could capture, as I'm not aware of any other boards (other than the RIoTboard - and that was only limited) running Android have done this either.

Acutually , ayufan's (7) build does GPIO in sysfs just as well as the gnu+linux distros. A little known fact , actually Android has 'always' been able to do GPIO and all that needed to happen was set an option for the kernel compile; that's it !

I asked ayufan to set the option with compile|test a couple of weeks ago , and voila success !

So, in ayufan's build of Android 7 we have /sys/class/gpio/+   which works just as it does in gnu+linux. You can access the GPIO in Java and C also, if you are a conversant Droid developer. If you have the rooted version ( I think they all are ) you can use a terminal emulation program like "Better Terminal Pro" to set the various pins on|off with the normal sysfs commands.

Good job, Marcus. Lets put this new feature into good use :-)
(10-07-2016, 05:16 PM)tllim Wrote: [ -> ]
(10-06-2016, 07:56 AM)MarkHaysHarris777 Wrote: [ -> ]
(10-05-2016, 06:28 PM)pfeerick Wrote: [ -> ]There is currently no support on Android for controlling the GPIO pins. I believe it has been discussed as a desired feature, and will probably eventuate, but I haven't seen anything yet indicating it is being worked on. Hopefully it will eventuate, as it would be another market the pine64 could capture, as I'm not aware of any other boards (other than the RIoTboard - and that was only limited) running Android have done this either.

Acutually , ayufan's (7) build does GPIO in sysfs just as well as the gnu+linux distros. A little known fact , actually Android has 'always' been able to do GPIO and all that needed to happen was set an option for the kernel compile; that's it !

I asked ayufan to set the option with compile|test a couple of weeks ago , and voila success !

So, in ayufan's build of Android 7 we have /sys/class/gpio/+   which works just as it does in gnu+linux. You can access the GPIO in Java and C also, if you are a conversant Droid developer. If you have the rooted version ( I think they all are ) you can use a terminal emulation program like "Better Terminal Pro" to set the various pins on|off with the normal sysfs commands.

Good job, Marcus. Lets put this new feature into good use :-)
Just now found this thread.  Makes me think of going Android instead of Ubuntu/openHAB for my automation scripts.  I like this a LOT, but can multiple client Android or Linux devices connect, similar to or with VNC, to a central controlling Pine64 running Android and also acting as a [pseudo?] VNC server?  Can the current state of Android on Pine64 support serving multiple VNC sessions to VNC clients without the clients controlling each others' environments?

(I currently have a Droid X2 connecting with VNC to my Pine64 central controller, and as a result, the user interface aspect that Linux's DEs limit me to is very crude and awkward to use on the Droid X2).