FYI. Andrew will no longer be supporting this library.
http://www.b4x.com/forum/bugs-wishlist/8774-wish-ioio-support.html#post90055
I'll post the new libraries here. It seems like it is better this way than to have two threads on the forum for the same library.
Version: v2.07 (use this one)
This uses the latest java IOIOlib from Ytai. It includes all the latest bug fixes. Look at the IOIO wiki release notes for more information. There is no new functionality in this version. Your IOIO should be using
version 5.06 application firmware. Use the latest bootloader as well.
The IOIO has become a
solid platform. It offers a unique functionality still today and does what it was designed to do well. Although there isn't a lot of activity it is still being supported by Ytai and I intend to here at B4A as well.
In the zip file I include files needed for OpenAcc and Device connections.
Please place any IOIO related questions in this thread.
Version: v2.05 (for reference only)
This version brings heaps of long awaited features. You can now finally connect the IOIO in four ways.
USB ADB: Possible
only on SDK 16 and below. After this release Goggle secured ADB and no support for this connection exists in newer Android versions.
BLUETOOTH: This works on almost all versions of Android that have Bluetooth.
USB OPEN ACCESSORY: This works on SDK 10 and above. Your Android device must however support Open Accessory. Most newer devices do have support. For this to work you need to add items to the manifest file of your app. It also requires a two extra commands in your app to register and unregister a broadcast receiver.
USB DEVICE: Connects the IOIO to your Andorid device as a device. This requires that your Android supports Open_Accessory and OTG. In this mode your Android device powers the IOIO. Make sure the IOIO-OTG is set to Auto and not HOST mode.
There is now a
Motor Control Sequencer (aka waveform/pwm sequencer). This is a very cool addition made by Ytai. You need application firmware v5 for this functionality.
There is now a synch() command that allows managing the multi-threaded nature of the Android OS with the synchronous nature of the IOIO.
IOIO.Initialize is now required. It also returns a string indicating which connection types are supported by the Andorid device. This only test software support, your device may still lack the required hardware.
Add the changes to your manifest file with the changes in "add this with manifest editor.txt".
Works with both the original IOIO and the IOIO-OTG.
This version
requires that your IOIO be running application firmware v5!
This version is built on
Ytai's IOIOlib v5.04
Remaining Issues
The sequencer has trouble closing and reopening if done too rapidly. I don't think this is an b4a library issue but an IOIOlib issue. If you try to reopen and an exception is thrown you will need to unplug and plug back in the IOIO to reconnect unless you are using BT of course.
Finally
Enjoy. Since this takes a dedicated effort to maintain I wouldn't mind hearing about your projects. Also... please study the workbench 2.32 code before posting "how to" questions. I kept the code as simple as possible and you have basic examples on how to do use just about all the functionality of the IOIO.
Version: v1.9 (for reference only)
Only two noteworthy changes in this version.
Capacitive sensing functionality. A cap-sense input pin can be used to measure capacitance, typically in touch sensing applications. Note that not every pin can be used as cap-sense.
The PulseWidthSweep method. Changes the pulsewidth from pulseWidthStart to pulseWidthEnd by step with a msPause in ms b/w each loop. Step should always be positive. Just make start greater than end to count backwards.
This method is usefull for better control of servos.
Note that this version is built on Ytai's IOIOlib v4.0. This means that the IOIO firmware app needs to be v4.0 too.
Judging from the download there seems to be a least 50 or so of you using the library.
Version: v1.8 (for reference only)
Many things have changed in this version so be sure to read everything to avoid questions on the forum that are answered in the documentation. Be sure to read the documentation that Ytai provides for the IOIO on github. The latest B4A library is based on the
Ytai's 3.26 version.
https://github.com/ytai/ioio/wiki/IOIOLib-Basics
Changes/Improvements
The library now supports connections to multiple IOIOs simultaneously. See the IOIO Workbench app for an example.
Most of the methods are now threaded so it all works with SDK > 9, no more NetworkOnMainThread exceptions.
Documentation improved, examples for most methods.
An IOIO Workbench app to verify most IOIO functionality.
Uses latest code from Ytai, so other bug fixes.
Remaining Issues
Starting with Android 4.1 Google has added encryption to the ADB interface that IOIO uses to communicate when connected through USB.
Ytai doesn't have any plans to support this change. Because this version of the library doesn't support OpenAcc, the only way to connect to Android devices 4.1 and higher is via Bluetooth.
Note:
IOIO Test is for v1.7 of the library
IOIO Workbench 2.0 is for v1.8 of the library
IOIO Workbench 2.1 is for v1.9 of the library
IOIO Workbench 2.32 is for v2.07 of the library
For IOIO Workbench you will need to adapt your screen layout for your device.