In your code you use the simplest form of PulseInput initialization which defaults to using a double precision module. Since there are only 3 double-precision modules on the IOIO, the fourth attempt at using a double precision module fails.
I suggest taking a look at the IOIO Wiki <https://github.com/ytai/ioio/wiki/Pulse-Input> on Pulse Input to read more about why this occours. As far as fixing it, after reading the wiki I would do something like this: // input = ioio_.openPulseInput(Spec spec, ClockRate clock_rate, PulseMode mode, boolean double_precision) Input = ioio_.openPulseInput(new Spec(IN_PIN), ClockRate.RATE_250KHz, PulseMode.POSITIVE, false); Keep in mind the limitations for single precision vs double precision. However, for the HC-SR04 it shouldn't be an issue assuming you pick a good frequency scaling value. If you're still curious about starting a new thread, it can definitely be done, but I don't think it's your issue. @Ytai - To be fair, the Wiki doesn't explicitly mention this overload. I'll can update it, but I'm not sure how. -- 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.
