by Marsman » Fri Mar 01, 2013 8:01 pm
by Marsman
Fri Mar 01, 2013 8:01 pm
Hi,
is there a command in the RoBoard library to read a frequency of a digital signal from a PWM port?
I have an optocoupler near the axis of a wheels from my robot which switches on and off according to the speed of the wheel (disc with black/white stripes). When the wheel turns, the frequency of the digital signal is proportional to the speed. So far, I am using a routine which looks for say a rising edge, captures the time, then waits for the falling edge, and captures the time, again.
It would be more elegant if the RoBoard could deliver the frequency with a library command.
Thanks,
marsman
Hi,
is there a command in the RoBoard library to read a frequency of a digital signal from a PWM port?
I have an optocoupler near the axis of a wheels from my robot which switches on and off according to the speed of the wheel (disc with black/white stripes). When the wheel turns, the frequency of the digital signal is proportional to the speed. So far, I am using a routine which looks for say a rising edge, captures the time, then waits for the falling edge, and captures the time, again.
It would be more elegant if the RoBoard could deliver the frequency with a library command.
Thanks,
marsman