Ping Library for Arduino Author: Caleb Zulawski Contact: caleb.zulawski@gmail.com
| Release | Date | Changes |
|---|---|---|
| 1.0a | 2009-05-12 | Initial Alpha Release |
| 1.1 | 2009-06-12 | Formal Release Changed calibration format |
| 1.2 | 2010-08-17 | Fixed incorrect files (Jesus Alonso) |
| 1.3 | 2010-10-06 | Fixed keywords.txt (Alan Carey) |
Ping is a library for the Arduino.
The Ping library simplifies the usage of the Ping))) Ultrasonic Sensor with Arduino. It is an implementation of the concepts provided in the Arduino Ping))) tutorial.
Download here:
Ping string name = Ping(int pin, double inMod, double cmMod);
Ping ping = Ping(13);
Ping ping = Ping(13,0,0);
This initializes a Ping sensor on pin 13.
The optional inMod and cmMod arguments are used to correct erroneous output by the inches() and centimeters() functions. For example, if the inches() function returns a high value, increasing inMod would correct it, and vice versa. The same applies for the centimeters() function. The default values of inMod and cmMod are 0.
This returns the amount of time in microseconds from when the sensor emits the sound to when the sound hits an object and returns to the sensor.
This returns the distance in inches between the sensor and the nearest object in front of it.
This returns the distance in centimeters between the sensor and the nearest object in front of it.
| Last Modified: | October 06, 2010, at 08:08 PM |
| By: | calebzulawski |