Ok, thanks for the heads up.

On Sunday, November 8, 2015 at 10:54:42 PM UTC-5, Ytai wrote:
>
> This has nothing to do with UART. It must likely has more to do with the 
> basic app structure. I recommend that you start with HelloIOIOService and 
> evolve it to your own use case. You probably forgot something in the app 
> event handlers or manifest etc.
> On Nov 8, 2015 7:05 PM, "Eric Solomon" <[email protected] <javascript:>> 
> wrote:
>
>> I'm writing an Android app that uses the IOIO as a USB-UART driver. The 
>> app's transfer protocols use a state machine to determine when to start 
>> transferring, stop, etc. I have a service being bound in the background to 
>> a main activity. In the service, I extend the BaseIOIOLooper class. In 
>> terms of control, the app is essentially similar to IOIOPlotter. However, I 
>> can't get the IOIO to setup and operate normally.
>>
>> My Looper.setup() method:
>>
>>         @Override
>>         protected void setup() throws ConnectionLostException, 
>> InterruptedException {
>>             log_.write_log_line(log_header_+"Beginning IOIO setup.");
>>             // Initialize IOIO UART pins
>>             // Input at pin 1, output at pin 2
>>             // FIXME determine baud, parity, stopbits
>>             // FIXME throwing NullPointerException. Can't resolve ioio_?
>>             uart_ = ioio_.openUart(new DigitalInput.Spec(1), new 
>> DigitalOutput.Spec(2),
>>                     38400, Uart.Parity.EVEN, Uart.StopBits.ONE);
>>             // Get IO streams
>>             in_ = uart_.getInputStream();
>>             out_ = uart_.getOutputStream();
>>             // Set default states
>>             setCurrentState(State.STOPPED);
>>             setTargetState(State.TRANSFERRING);
>>             currInPacket_[0]=1; //Initial value to start transferring
>>             log_.write_log_line(log_header_ + "IOIO setup complete.\n\t"+
>>                 "Output pin set to 1\n\tInput pin set to 2\n\tBaud rate 
>> set to 38400\n\t"+
>>                 "Parity set to even\n\tStop bits set to 1");
>>         }
>>
>>
>> The app never gets to the point that writes "Beginning IOIO setup." to 
>> the log, which makes me think that I should call the setup() method 
>> manually.
>> When is IOIO.setup() called? Should I ever call it manually? Any simple 
>> examples of setting up UART with the IOIO?
>>
>>
>> -- 
>> 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] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> Visit this group at http://groups.google.com/group/ioio-users.
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
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/d/optout.

Reply via email to