a20 with android

Started by transmissions4less, January 06, 2014, 12:41:05 AM

Previous topic - Next topic

transmissions4less

i am trying to use the the a20 board as a mobile DAQ system, interested to know any success in accessing the GPIO and work with the analogue and digital IOs, in beagleboard there is alibrary to control the GPIO even though control the PWM duty cycle and frequency, is there any thing related in how to do that with the A20, any help will be highly appreciated.  also interested to know if made it with basic4android to control the GPIO. no doubt that the allwinnertech.com will be serious competitor to TI and others of such scale. good job.

dave-at-axon

Hi there, I am still waiting for my A20's to arrive and then test this myself but you should be able to get GPIO working as I see that the GPIO's are already configured in the kernel build to be in user space.

As you are using Android, you need to create and use a JNI to control the GPIO. There is a number of samples on the Olimex websites that do this. You could also do your own. On another ARM board running Android I created an I2C and GPIO driver. Here is a link to the talk on it and the links to the source are in there.

http://www.friendlyarm.net/forum/topic/3419

You'll need the Android NDK to build the files. In Eclipse this is quite easy to do. I am still trying to work out how to include the JNI stuff within Android Studio. :)

I am working on a daughter board for the A20 that will have a number of I2C based analog inputs along with GPIO to control valves etc so I'll share what I can when I have it all working in a few weeks time.