multiple analog input problem

121 views
Skip to first unread message

thcbin1110

unread,
Dec 8, 2011, 2:27:19 PM12/8/11
to ioio-...@googlegroups.com
hi, I get the a problem when try to call getVoltage() for two analog pin input in the same iteration of loop function. for the some first iterations it works correctly but after some time, reading value becomes wrong. It always gets the value of 0.08064517 or 0.07096774 even though the input value is changed. When this situation happens, the activities seems to be stucked, I can not go to any other activities. I try to debug it and it seem to be stuck inside the onPause() function. It can not stop the connection of the IOIO board. I don't know whether the getVoltage() make the onPause() hang or not ( although without pressing the back button of the phone, which assert the onPause(), the activities still working but get a wrong value of the voltage). 

Ytai Ben-Tsvi

unread,
Dec 8, 2011, 7:53:35 PM12/8/11
to ioio-...@googlegroups.com
Can you please attach your code that reproduces this problem?

thcbin1110

unread,
Dec 9, 2011, 12:11:37 AM12/9/11
to ioio-...@googlegroups.com
hi, the attachment is the project. I try to read the analog input and draw it like the oscilloscope. the ioio thread is in the DiagramActivity. I currently use the ioio0101 lib. I try to print out the value reading, and when reading go wrong the output always around 0V( this is not happen when I try to open only 1 analog input). thank you for your help
IOIOSimpleApp.zip

Ytai Ben-Tsvi

unread,
Dec 9, 2011, 2:56:53 AM12/9/11
to ioio-...@googlegroups.com
Your IOIOThread looks OK.
I don't know what's wrong, but I do know that concurrent analog inputs have been tested. Maybe check the logcat output for anything suspicious?

BTW, are you aware that AnalogInput samples at 1KHz? Will this be enough for your scope?

Ytai Ben-Tsvi

unread,
Mar 12, 2013, 12:03:25 PM3/12/13
to ioio-...@googlegroups.com
App firmware V4.x is compatible with both IOIO V1 (w/ bootloader 3.x) and IOIO-OTG (w/ bootloader 3.x or device-mode bootloader 4.x).


On Tue, Mar 12, 2013 at 8:21 AM, Nigel Stevens <niges...@googlemail.com> wrote:
I notice that there is a fix for this issue for people using firmware app version 4.0,
is there a workround or v4.0 suitable for the sparkfun otg (spark020) ?
--
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+...@googlegroups.com.

To post to this group, send email to ioio-...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Nigel Stevens

unread,
Mar 12, 2013, 12:24:14 PM3/12/13
to ioio-...@googlegroups.com

Any idea why (with the appropriate client version) it works with v3 but hangs waiting for handshake with v4?  With v4 I can see the ioio responding if I connect via a terminal, but v4 client never gets past the handshake, when using as a device linked via USB to a Linux PC

You received this message because you are subscribed to a topic in the Google Groups "ioio-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ioio-users/TrX6n6al_J4/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to ioio-users+...@googlegroups.com.

Ytai Ben-Tsvi

unread,
Mar 12, 2013, 12:40:57 PM3/12/13
to ioio-...@googlegroups.com
It might be a port permission issue or failing to pass the right serial port on the command line (-Dioio.SerialPorts=xxxx).
Have you installed the udev rules file?

NStevens

unread,
Aug 8, 2014, 10:48:10 AM8/8/14
to ioio-...@googlegroups.com
It looked like that but like I say it works just fine with app v3 and a v3 client example (helloioioconsole on same hardware) but the same doesn't work when putting v4 app on with ioiodude and then using a v4 client... tried v4 twice with v3 in beteeen, so I'm a little mystified!

Ytai Ben-Tsvi

unread,
Aug 8, 2014, 12:24:37 PM8/8/14
to ioio-...@googlegroups.com
I would recommend:
  • Get the latest IOIODude (v1.1).
  • Use it to install the latest firmware (v5.04).
  • Reboot the IOIO and connect it to the PC, check whether the port shows up.
  • Use IOIODude (with the IOIO in app mode) to validate the connection (ioiodude versions...)
  • If that all works, try to use the prebuild HelloIOIOConsole.jar.
  • If that works, try compiling this app yourself.


Reply all
Reply to author
Forward
0 new messages