Taking a break from motor encoders today, and working on my three proximity sensors. Ultrasonic was a simple one to implement, but I’ve yet to determine its capabilities with respect to how narrow the “beam” is. The laser one seems pretty accurate and of course has a very narrow scope. The infrared sensor was fun, because it returns an analog voltage. This had me playing with map(), floats vs integers, and mapping the response curve to a suitable equation. mycurvefit.com helped out there.
y = 6.226356 + (93.02443 – 6.226356)/(1 + (x/0.624905)^2.348829) 😆
One more to try, but it will wait for another day. Pi camera