Measuring distance with hc-sr04


i new arduino, have project working on.  use , hc-sr04 uno monitor distance between stationary object , parked vehicle.  store distance in variable when trigger switch , compare current distance saved distance , trigger alarm when distance moves apart.  accuracy isn't critical, within foot.

i have located code interface hc-sr04 measurements getting seem fluctuate @ times.  large spikes.  how go getting steady figure use comparisons?

i have read kalman filter , think may useful, i'm not math whiz , doesn't make sense me.  that's why i'm here.

what target?  different target materials reflect ultra sound differently (a hanging cloth curtain might not reflect @ all).  "clutter" or angled targets cause funky reflections.  how ranging?  you must wait long enough reflections die down or  will errors.  


Arduino Forum > Using Arduino > Sensors > Measuring distance with hc-sr04


arduino

Comments

Popular posts from this blog

Error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode - Raspberry Pi Forums

class MPU6050 has no member named begin

missing filename after '-o'