Averaging HC-SR04 ultrasonic distance sensor readings in a non-blocking manner
Posted by Nathan House,
in
Programming
08 July 2013
·
8,727 views
This is a reply to a facebook post. It would have been difficult to read in facebook's narrow layout, so I'm posting it here.
In order to average three readings from a sensor in a non-blocking manner, you could either have three variables like this:int ultrasonicReading0 = 0;int ultrasonicReading1 = 0;int ultrasonicReading2 = 0;
A variable to store the...
In order to average three readings from a sensor in a non-blocking manner, you could either have three variables like this:int ultrasonicReading0 = 0;int ultrasonicReading1 = 0;int ultrasonicReading2 = 0;
A variable to store the...



