South Georgia | WildBuckwheat - 6/13/2019 20:33
A PWM input sends the distance out in a pulse. The distance measured by the sensor is represented by the length of the pulse. From the sensor manual:
Pin 2- Pulse Width Output: This pin outputs a pulse width representation of the distance with a scale factor of 1uS per
mm. The pulse width output is sent with a value within 0.5% of the serial output.
You would connect this to a digital input pin and measure how long the signal stays high for. You would not use a capacitor or an analog input pin. Example, the pulse stays high for 1000 microseconds (1 milliseconds) when the sensor distance is 1000 millimeters (1 meter).
I understand that's how the PWM out on the sensor works, but is there a good way to read PWM on tht Arduino? I thought I would be needing to convert it to analog to actually read it. Is that not correct?
See, I already told y'all I don't know what I'm talking about.
Adrian |