Is it possible that your app tries to use the same pin for two different purposes?
On Tue, Jan 14, 2014 at 9:14 AM, Markus Kaczmarek < [email protected]> wrote: > Ah.. If I'd found That part of the wiki a bit earlier... o_O' >> > Ok, now it's all good except for the rather cryptic message "Resource > already allocated" instead of the good old "Pin already opened" message. > > Now I'm getting the following error output when trying to open a UART. > This was tried with two versions of the same app, one old and (reasonably) > bug-free. > Also, I tried compiling them both with the old firmware package (330) and > the new release. > The latter produces this in both cases, the previous not: > > 01-14 18:05:15.774: E/IOIOBaseApplicationHelper(15189): Unexpected > exception caught > 01-14 18:05:15.774: E/IOIOBaseApplicationHelper(15189): > java.lang.IllegalArgumentException > 01-14 18:05:15.774: E/IOIOBaseApplicationHelper(15189): at > ioio.lib.impl.ResourceManager.alloc(ResourceManager.java:91) > 01-14 18:05:15.774: E/IOIOBaseApplicationHelper(15189): at > ioio.lib.impl.IOIOImpl.openUart(IOIOImpl.java:454) > 01-14 18:05:15.774: E/IOIOBaseApplicationHelper(15189): at > se.macke.droidpad.DPMainActivity$IOIO.setup(DPMainActivity.java:359) > 01-14 18:05:15.774: E/IOIOBaseApplicationHelper(15189): at > ioio.lib.util.BaseIOIOLooper.setup(BaseIOIOLooper.java:20) > 01-14 18:05:15.774: E/IOIOBaseApplicationHelper(15189): at > ioio.lib.util.IOIOBaseApplicationHelper$IOIOThread.run(IOIOBaseApplicationHelper.java:60) > > This error points to the following line: > > _midiOut = ioio_.openUart(null,new Spec(MIDI_OUTPUT_PIN,Mode.OPEN_DRAIN > ), BAUD,Parity.NONE,StopBits.ONE); > > That is set up like this in the class body: > > private static final int BAUD = 31250; > > private static final int MIDI_INPUT_PIN = 6; > > private static final int MIDI_OUTPUT_PIN = 7; > > /** > > * The output for MIDI messages > > */ > private Uart _midiOut; > > > -- > You received this message because you are subscribed to the Google Groups > "ioio-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/ioio-users. > For more options, visit https://groups.google.com/groups/opt_out. > -- You received this message because you are subscribed to the Google Groups "ioio-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/ioio-users. For more options, visit https://groups.google.com/groups/opt_out.
