IOIO-OTG Hookup Guide
Running Your First PC App
We will begin by running a PC application from the App-IOIOxxxx folder downloaded from the IOIO GitHub repo. Download it now, if you have not done so already. Using this known-good application will help to ensure everything is working correctly, both on the hardware and software side.
Plug the IOIO into Your PC
Using a micro USB cable, plug the IOIO-OTG into your computer’s USB port. You should see the red power LED illuminate. No other connections are necessary at this time.
Find the IOIO’s Serial Port
Next, find the IOIO’s serial port so we can communicate with it through the command line. Install the drivers mentioned in the Software Installation section, if you have not done so already.
On Mac OSX or Linux, open the Command Line Interface (CLI) of your choice and type:
You should see the IOIO appear as tty.usbmodemXXXX, where the X’s are some specific characters and numbers.
On Windows, open the Device Manager, and check to see which COM Port the IOIO has enumerated as under the ports section. The IOIO will appear as COMXX, where the X’s are a specific number.
Take note of this, as we will need it shortly.
Navigate to the Pre-Built App
In your command line, navigate to the App-IOIOxxxx folder. Then
cd into the
bin folder. In here, there is a binary file titled
HelloIOIOConsole-5.07-standalone.jar. We’re going to run this application from the command line. It will establish a connection with the IOIO and allow you to control the onboard Stat LED from the command line.
To run the app, type the following:
java -Dioio.SerialPorts=YOUR_IOIO_SERIAL_PORT -jar HelloIOIOConsole-5.07-standalone.jar
YOUR_IOIO_SERIAL_PORT is replaced by the serial port from the previous step.
On Mac and Linux, this will look something like:
java -Dioio.SerialPorts=/dev/tty.usbmodemfd141 -jar HelloIOIOConsole-5.07-standalone.jar
On Windows, this will look something like:
java -Dioio.SerialPorts=COM65 -jar HelloIOIOConsole-5.07-standalone.jar
You should see some information printed to the command line. The most important line is
IOIO connection established. If you see that, you’re connected to your IOIO through the command line!
Now, press enter. You should see some instructions print to the screen.
Unknown input. t=toggle, n=on, f=off, q=quit.
t + ENTER. You should see the stat LED turn on. Press
t + ENTER again, and it should turn off. You are now controlling your IOIO from your PC! Try using the other commands.
You have just run your first IOIO PC application!
If you are having trouble getting the app to work, please visit the Troubleshooting section.