Sharp GP2 familly distance sensor library
Dependents: FRC_2018 0hackton_08_06_18 0hackton_08_06_18_publish Kenya_2019 ... more
Diff: GP2A.h
- Revision:
- 3:dcd04d9d0eb7
- Parent:
- 2:5e591a5b8edd
- Child:
- 4:4f443a6a6843
diff -r 5e591a5b8edd -r dcd04d9d0eb7 GP2A.h --- a/GP2A.h Mon May 21 16:14:54 2018 +0000 +++ b/GP2A.h Tue May 22 17:15:37 2018 +0000 @@ -54,38 +54,39 @@ #define GP2Y0A21YK0F 20.888 /** - * Includes + * Includes : Mbed library */ #include "mbed.h" /** - * GP2A Sensor + * GP2A Sensor : See sharp website for more informations + * http://www.sharp-world.com/products/device/lineup/selection/opto/haca/diagram.html */ class GP2A { public : /** - * Constructor. + * Constructor of a Sharp GP2 Familly object. * - * @param vmes is the Mbed pin used to connect with GP2A sensor - * @param dMin is the GP2A sensor min distance to mesure - * @param dMax is the GP2A sensor max distance to mesure - * @param slope is the slope of the linear part of the graph V = f(1/d) + * @param vmes : the Mbed pin used to connect with GP2A sensor + * @param dMin : the GP2A sensor min distance to mesure + * @param dMax : the GP2A sensor max distance to mesure + * @param slope : the slope of the linear part of the graph V = f(1/d) */ GP2A(PinName vmes, float dMin, float dMax, float slope); /** - * Return the distance to target in cm + * Return the distance to target mesured by sensor in cm * - * @return the distance in cm + * @return Distance in cm */ double getDistance (void); /** - * Return the voltage on GP2A output + * Return the current voltage on GP2A output * - * @return the voltage between 0 and 3.3V + * @return Voltage between 0 and 3.3V */ double getVoltage (void);