Something like PulseIn in Arduino?

12 Jan 2010

Hi, i want read a rc signal with Mbed and i need to know the time that pulse is HIGH.

With Arduino i worked with PulseIn

http://www.arduino.cc/en/Reference/PulseIn

How could i do with Mbed?

Thx and sorry for my bad english.

13 Jan 2010

This is what I did when porting code to use a PING range finder from Arduino to MBED.

 

// pulseIn
while (!pingPin); // wait for high
tmr.start();
while (pingPin); // wait for low
duration = tmr.read_us();

Hope it helps.

Matthew

14 Jan 2010

0k thank you very much!

i'll try it.