00001 #ifndef AP_RangeFinder_SharpGP2Y_H 00002 #define AP_RangeFinder_SharpGP2Y_H 00003 00004 #include "RangeFinder.h" 00005 00006 #define AP_RANGEFINDER_SHARPEGP2Y_MIN_DISTANCE 20 00007 #define AP_RANGEFINDER_SHARPEGP2Y_MAX_DISTANCE 150 00008 00009 class AP_RangeFinder_SharpGP2Y : public RangeFinder 00010 { 00011 public: 00012 void init(int analogPort); 00013 int read(); // read value from analog port and return distance in cm 00014 }; 00015 #endif