Smoothen readout of a Ping Sensor
Matthias09
Posts: 47
Hey guys,
I am using a Ping sensor (with SX/B) to detect a ball (actually two sensors, one of each side of the beam where the ball is rolling in, 2ft long). When in debugging mode and polling, I can see, that the results of the sensor are varying. To get more reliable results, I want to smooth them, e.g. by collecting several values and creating an average value.
I think I read a thread in this forum about it a couple of days ago, but cannot find it anymore (searched 15 min). So can you either give me a link to this thread or provide me with some 'smooth' [noparse]:)[/noparse] ideas?
Thanks guys!
Matthias
I am using a Ping sensor (with SX/B) to detect a ball (actually two sensors, one of each side of the beam where the ball is rolling in, 2ft long). When in debugging mode and polling, I can see, that the results of the sensor are varying. To get more reliable results, I want to smooth them, e.g. by collecting several values and creating an average value.
I think I read a thread in this forum about it a couple of days ago, but cannot find it anymore (searched 15 min). So can you either give me a link to this thread or provide me with some 'smooth' [noparse]:)[/noparse] ideas?
Thanks guys!
Matthias
Comments
-Phil
That was what I was looking for!
Matthias
I hope that you can use something out of that link
photomankc,
Thanks, glad you can use that code
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.