0
$\begingroup$

Rosanswers logo

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?

Peter


Originally posted by PeterMilani on ROS Answers with karma: 1493 on 2012-12-27

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by PeterMilani with karma: 1493 on 2012-12-27

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.