Either run it on a separate thread or interrupt the current thread after some timeout. Search this forum for TimerTask. Your question has been asked and answered several times.
On Wed, Jun 17, 2015 at 4:25 PM, James Warner <[email protected]> wrote: > My mistake, It was working, an intermittent hardware issue causing it! > Narrowed down the code that's hanging up the loop - it's a frequency > counter (and there are no pulses arriving in my prototype setup) guess it's > blocking and timing out waiting for a pulse. Has any of the freq counting > code changed since 330? Any suggestions for avoiding the frequency counter > blocking when no pulses are received? > James > > > On Wednesday, June 17, 2015 at 11:22:14 PM UTC+1, James Warner wrote: >> >> I've declared it (and the app auto runs and asks if it can use USB >> device, and IOIOLibAndroidDevice lib is included) >> Will try building helloIOIO to confirm >> >> It's still running OK in accessory mode - but since upgrading from 330 to >> 504 the loop runs MUCH slower - around 2 times a second instead of 20 odd, >> any reason for this in the version difference? >> >> James >> >> >> On Wednesday, June 17, 2015 at 8:44:45 PM UTC+1, Ytai wrote: >>> >>> The next logical step is to try building HelloIOIO from source. Then >>> figure out what's different in your app. The main things required for IOIO >>> in device mode support are including the IOIOLibAndroidDevice library and >>> some manifest declarations. >>> >>> On Wed, Jun 17, 2015 at 12:23 PM, James Warner <[email protected]> >>> wrote: >>> >>>> trying to use IOIO Host mode (IOIO powered from Nexus 7) - Latest >>>> firmware & HelloIOIO app works - my app doesn't (but works fine when it's >>>> in accessory mode - what am I missing in my project? >>>> >>>> Many Thanks, >>>> James >>>> >>>> -- >>>> 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. >>>> >>> >>> -- > 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. > -- 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.
