So I set up the TFMini exactly like the Hook Up Guide said to. (Red Board and Logic Level Converter)
99% sure I have it right because it works.
I have my little rig clamped to a table and pointing at a wall. Nothing is moving.
But the results “creep”.
I am doing some strong arm data filtering in the code. I am taking 99 readings, then sorting them and returning the median.
In my first test, my first result was 279cm then it “creeped” up to 282cm over the course of an hour. Then it stayed there, stable at 282cm for the next 10 hours.
https://i.imgur.com/0R4l0xY.pngIn test number 2, I put a big pause at the beginning of the code, but still 99 readings then sort, return the median.
Now my first result was 284cm. Then it went up and down and it was on 287 when I killed it.
https://i.imgur.com/v9gpRQt.pngAm I doing something stupid?
Are these sensors “just for fun”?
Any ideas would be great. Thanks in advance.
I am trying to use this sensor to control a motor to position a thing 10 feet away.