IOIO keeps resetting when opening analog input

42 views
Skip to first unread message

kkannan

unread,
Nov 25, 2017, 9:43:35 AM11/25/17
to ioio-users
Hi IOIO user, Ytai

I am having a strange problem when trying to use analog input. In fact I didn't even connect anything but just declaring ioio_.openAnalogInput(34) causes the ioio
to reset endlessly. Even tried 32,33 and few more pin but the result is the same. My boards IOIO OTG from sparkfun & seedstudio  but both exhibit the same behavior.

When the line is commented out things are OK.

I guess the firmware is the latest since I bought it last month and powering it through 5V rail.

Appreciate any help to solve it.

Thanks
Kannan

Tyler

unread,
Nov 25, 2017, 2:41:08 PM11/25/17
to ioio-users
Kannan, 

Does the logcat give any clues? Typically if you're opening a pin illegally (which I suspect) or violating a rule for the IOIO there will be an error noted on the log. 

kkannan

unread,
Nov 25, 2017, 9:08:45 PM11/25/17
to ioio-users
Hi Tyler,

I couldn't find anything in the logcat. I am not aware of opening any pin illegally, just including the following line causes the ioio to reset repeatedly.

private AnalogInput bumper;


@Override
protected void setup() throws ConnectionLostException, InterruptedException {
 showVersions
(ioio_, "IOIO connected!");
 uart
= ioio_.openUart(4,3, 115200, Uart.Parity.NONE,Uart.StopBits.ONE);
 
out = uart.getOutputStream();
 
in = uart.getInputStream();

 bumper = ioio_.openAnalogInput(34);
}


Is anything wrong to declare analog input this way ? I am following ytai example in the github.

Thanks
Kannan

Tyler

unread,
Nov 26, 2017, 3:27:22 PM11/26/17
to ioio-users
Kannan,

I don't see anything that is incorrect in your code. You've opened the AnalogInput correctly and I don't see anything conflicting that would cause an error such as attempting to use the same pin twice. I would have to see more to find a problem - would you mind posting a logcat showing the reset and startup of the ioio? 

Tyler

Ytai Ben-Tsvi

unread,
Nov 26, 2017, 6:31:53 PM11/26/17
to ioio-...@googlegroups.com
Is this over Bluetooth? If so, try a different dongle. Some dongles seem to not be able to keep up with the bandwidth required for analog inputs and corrupt the data, causing the connection to drop.

--
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 ioio-users+unsubscribe@googlegroups.com.
To post to this group, send email to ioio-...@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.

kumarasamy parvathakannan

unread,
Nov 26, 2017, 9:06:52 PM11/26/17
to ioio-...@googlegroups.com
Hi Ytai,

Correct, I am using the dongle to connect to the phone. 

I'll first connect with usb cable and confirm it.

Thanks

kumarasamy parvathakannan

unread,
Dec 4, 2017, 9:33:15 AM12/4/17
to ioio-...@googlegroups.com
Just an update, I ordered few more dongles and they too exhibited the same problem. On further inspection I am  opening an uart in the same program. After commenting out that code, the analogRead() works flawlessly with loop delay set to 100ms. However if I reduce the delay to 10 ms the issue comes back immediately. So it is indeed a bandwidth issue with BT dongles.

I am trying to connect a cable and it is connecting at all, well that is another issue to diagnose.

Thanks ytai  & Tyler
Reply all
Reply to author
Forward
0 new messages