codelectron
Posts: 16
Joined: Thu Oct 10, 2013 6:11 pm
Location: Germany
Contact: Website

Tutorial: How to measure distance using Ultrasonic Sensor with Raspberry Pi – Python – HC-SR04

Thu Apr 26, 2018 4:54 pm

Hi All,

I have written a tutorial on How to measure distance using Ultrasonic Sensor with Raspberry Piand Python language. If you find it interesting or have any comments or feedback kindly let me know.

Krishna
www.codelectron.com

thread13
Posts: 1
Joined: Sun Sep 01, 2019 7:05 am

Re: Tutorial: How to measure distance using Ultrasonic Sensor with Raspberry Pi – Python – HC-SR04

Sun Sep 01, 2019 7:20 am

Hi Krishna,

Many thanks for taking your time in writing it -- I think it is a great tutorial, very well present and well explained. ( I am sure there are many more readers of this text than commenters -- I, for one thing, registered on these forums just to let you know how good your tutorial is ) )

I would probably add here for those interested that in my experiments the measurements were showing a significant amount of jitter, so it may make sense to average them over a train of ~20-30 samples or so ( depending on the range of distances one wants to measure ).

Also, it may worth noting that the speed of the sound in the air would depend on several conditions, air temperature being one of them: therefore, one may want to adjust the constant used in the code according to expected temperature of the air -- or may be tinker with other modules to experiment with air temperature readings, etc )

Best regards,
/t13

Return to “Teaching and learning resources”