Question

I've just got started with a IOIO OTG and a phone running Android 4.1.2

I've successfully imported the HelloIOIO project and the library into the eclipse/ADT workspace and ran the project but no LED would turn on. With USB debugging disabled, the IOIO is detected, launches the HelloIOIO app and the charging icon appears in the top right corner, but pins do not seem to change state. I've tweaked the code to loop through all and there is no change. Here's how I modified the Looper class:

class Looper extends BaseIOIOLooper {
        /** The on-board LED. */
        private DigitalOutput led_;
        private final int numPins = 46;
        private DigitalOutput[] pins = new DigitalOutput[numPins];

        /**
         * Called every time a connection with IOIO has been established.
         * Typically used to open pins.
         * 
         * @throws ConnectionLostException
         *             When IOIO connection is lost.
         * 
         * @see ioio.lib.util.AbstractIOIOActivity.IOIOThread#setup()
         */
        @Override
        protected void setup() throws ConnectionLostException {
//          led_ = ioio_.openDigitalOutput(IOIO.LED_PIN, true);
            for (int i = 0; i < numPins; i++) 
                pins[i] = ioio_.openDigitalOutput(i,true);
        }

        /**
         * Called repetitively while the IOIO is connected.
         * 
         * @throws ConnectionLostException
         *             When IOIO connection is lost.
         * 
         * @see ioio.lib.util.AbstractIOIOActivity.IOIOThread#loop()
         */
        @Override
        public void loop() throws ConnectionLostException {
            boolean isOn = !button_.isChecked();
//          led_.write(isOn);
            for (int i = 0; i < numPins; i++) 
                pins[i].write(isOn);
            try {
                Thread.sleep(100);
            } catch (InterruptedException e) {
            }
        }
    }

I've tried App-IOIO0400 initially, then App-IOIO0330 which I'm currently using.

I've done another test:

  • uninstalled the eclipse installed app
  • installed the HelloIOIO.apk app provided in App-IOIO0330 and the status led changed state

My question is why did this not work with the app compiled in eclipse ? How can I get that running ?

Also, a shameless plug: if I disable USB debugging how can I debug via wifi ?

Was it helpful?

Solution

This summer I developed a tool called protocoder http://www.protocoder.org, its open source and has a really good support for IOIO boards. No need to compile anything :)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top