QuoteIs there a way to use pulseIn with another timer than the one used by the interrupts?pulseIn() doesn't use a timer. It waits for the state to change or for millis() to have advance far enough. Since millis() doesn't advance when you have interrupts disabled, it's hard to believe that disabling interrupts allows pulseIn() to work. Not hard, actually. Impossible. Unless the thing that enables pulseIn() to return is that the signal actually changes.Turning interrupts off disables servo pulses, so it's no surprise that the servo doesn't move.So, why are you turning interrupts off?
Is there a way to use pulseIn with another timer than the one used by the interrupts?
If I use the noInterrupt in my getValues() function, then I can read the values perfectly, but my servo won't work anymore.Is there a way to use pulseIn with another timer than the one used by the interrupts?
I thought of external interrupts too, but I think that arduino has only 3(?) pins on which you can define external interrupts, and I cannot use those...
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16