Ask Your Question

How to use IOIO with android_core

asked 2012-12-27 11:05:47 -0600

updated 2014-01-28 17:14:40 -0600

ngrennan gravatar image

I want to utilise ROSJava and android_core with IOIO for android, in order to utilise all the input output pins, ADCs, I2C and SPI features of the device. How can I initialise and run IOIO within a class being run in NodeMainExecutor of android_core?


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2012-12-27 11:09:56 -0600

updated 2012-12-27 11:16:13 -0600

I was able to get IOIO to work with my NodeMain implementation, by using the low level IOIO instance exposed by

IOIO ioioboard = IOIOFactory.create();

and I initialised this in the classes onCreate() method.

From then on the ioioboard can be used to expose pins and the like in the normal way, and used in classes that wrap up board functionality into drivers as per Ben Ytai's IOIO Basics Page. Instead of utilising an IOIOService or Activity which have their own looper function. I utilised a publisher's CancellableLoop to poll and use the IOIO in a similar way. Notably that you would want to use a publisher with the IOIO in order to expose the information collected to other nodes.

Otherwise if using the IOIO as a controller you could utilise the onStart() method to initialise the hardware variables and update them within a subscriber listener when new information is availble.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2012-12-27 11:05:47 -0600

Seen: 296 times

Last updated: Dec 27 '12