January 2015
Beginner
324 pages
7h 42m
English
According to the specification, the PING))) sensor is accurate for objects that are between 2 centimeters and 3 meters away. (By the way, the reason for this is the length of the pulse that is generated. Its minimum length is 115 microseconds, and the maximum length is 18.5 milliseconds.) With our current approach, we don’t fully benefit from its precision because all calculations are performed using integer values. We can only measure distances with an accuracy of a centimeter. To enter the millimeter range, we have to use floating-point numbers.
Normally it’s a good idea to use integer operations, because compared to regular computers the Arduino’s memory and CPU capacities are severely limited ...
Read now
Unlock full access