I'm using the NewPing library. I'm trying to use my ping sensor to control a robot. My problem is that it keep dropping down to 0 which is interfering in my reading. How do I get the reading to stay smooth and steady. Didn't know if there may be a way to add capacitors or something.
Can you solve it in software and just ignore zero readings?
Like getting the average of 5 readings or something. I haven't really done any math with arduino yet. I will have to try to find somewhere to read about it.
I just shorten down how long I waited in between ping to 20 millisecond and got my reading between 5cm range. Works pretty good. So all the drop out to zero or the large number it spit out every once in a while it will just ignore it.
Hello everybody,
I need a help. I need to find minimum distance from many distance which are the output of HC-SR04.
As the explanation: Ultrasonic sensor will read continuously. But shows only the minimum value. This is as like as a comparator. But I can't solve the problem.
Please help me.