Go to the source code of this file.
Defines | |
| #define | GP2D120_MAX 1024 |
| Maximum value returned by the sharp gp2d120 sensor. | |
| #define | GP2D120_MIN 0 |
| Minimum value returned by the sharp gp2d120 sensor. | |
Functions | |
| long | read_gp2d120_raw () |
|
|
Maximum value returned by the sharp gp2d120 sensor.
|
|
|
Minimum value returned by the sharp gp2d120 sensor.
|
|
|
Reads the sharp gp2d120 distance sensor and returns the raw sensor value.
Definition at line 52 of file gp2d120.h. 00053 {
00054 long distance_raw = 0;
00055 // adc channel 2 (port a2) for the new distscroller board, 0 for the old.
00056 set_adc_channel(2);
00057 delay_ms(2);
00058 distance_raw = read_adc();
00059 return(distance_raw);
00060 }
|
1.3.9.1