I'm having a problem, already posted in Italian section, but I'm posting here so maybe the solution can be helpful to people around there. I have a sensor which makes 3 readings in a pulse train (inverted PWM signal). Here's an image that maybe explains better:
As you can see, it is inverted PWM output. That's why I need to take the time of the LOW signal states. Then, I need to calculate the three different values with this simple formulas:
PWM1 = T1/T PWM2 = T2/T PWM3 = T3/T
the period of T should be 1.2 sec = 1200 milliseconds.
I would like to do this with pulseIn() or interrupt, but maybe pulseIn() is much more easier. I don't have any idea on how to do this. Any ideas? Thanks!