User Manual

Converts the provided pulse_width argument from system ticks to microseconds (this is the same as
multiplying pulse_width by 0.4 µs, but without using floating-point math) and returns the result. The
same result could be achieved by calling ticks_to_microseconds(pulse_width).
Example
// if last high pulse was longer than 1500 microseconds
if (pulse_to_microseconds(get_last_high_pulse(0)) > 1500)
doSomething();
// if last high pulse was longer than 1500 microseconds
if (OrangutanPulseIn::toMicroseconds(OrangutanPulseIn::getLastHighPulse(0)) > 1500)
doSomething();
Pololu AVR Library Command Reference © 2001–2015 Pololu Corporation
8. Orangutan Pulse/PWM Inputs Page 35 of 65