1) PulseMode.POSITIVE measures the width of the positive side of your pulse
(the duration between rising edge to falling edge) as opposed to the cycle
duration (the duration between rising edge to the next rising edge).

2) That's because you didn't set a timer on it. One simple way to have all
channels read concurrently is to create one thread per PulseInput that just
loops and does what you do. Some points to pay attention to:

   - Remember to insert sleeps() between the readings, or else they'll be
   as fast as your pulse rate which means the load on the Android would
   increase linearly with the pulse rate, which is not what you want.
   - In order to close cleanly, interrupt() your threads from the
   disconect() call and then join() them. Have your threads exit in response
   to InterruptedException.
   - You can use the same Timer for all threads, creating a Timer per
   thread is wasteful.


On Wed, Feb 25, 2015 at 12:22 PM, Paul Johnson <[email protected]>
wrote:

> I should note that I am opening the Pulse Input with:
>
>                         pulse1 = ioio_.openPulseInput(new
> DigitalInput.Spec(1), ClockRate.RATE_62KHz,  PulseMode.POSITIVE, false);
> pulse2 = ioio_.openPulseInput(new DigitalInput.Spec(2),
> ClockRate.RATE_62KHz,  PulseMode.POSITIVE, false);
>
> And that I have configured it to use all single precision modules.
>
>
>  --
> 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.

Reply via email to