| aGP_ReadGP2D02 | Index |
Definition:
| int aGP_ReadGP2D02( | ); |
Return Value:
Description:
This routine retrieves a reading from a Sharp GP2D02 and returns the value in an int. A BrainStem GP 1.0 module only has one Sharp GP2D02 input. A Sharp GP2D12 sensor may be connected to an analog input. A Sharp GP2D15 sensor may be connected to a digital input (with the addition of a pull-up resistor).
Example:
x = aGP_ReadGP2D02();
This would read the distance from the GP2D02 sensor into variable x.
Related: