Basic library for Pololu's Sharp GP2Y0A51SK0F

Dependencies:   mbed

Dependents:   GrabTest R5 2016 Robotics Team 1

Committer:
Hypna
Date:
Thu Apr 07 23:06:50 2016 +0000
Revision:
1:8db052ec94f1
Parent:
0:d03df6dd14d6
Added sensor profiles

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Hypna 0:d03df6dd14d6 1 #ifndef DISTANCE_SENSOR_H
Hypna 0:d03df6dd14d6 2 #define DISTANCE_SENSOR_H
Hypna 0:d03df6dd14d6 3
Hypna 0:d03df6dd14d6 4 #include "mbed.h"
Hypna 0:d03df6dd14d6 5
Hypna 0:d03df6dd14d6 6 class DistanceSensor
Hypna 0:d03df6dd14d6 7 {
Hypna 0:d03df6dd14d6 8 public:
Hypna 1:8db052ec94f1 9 DistanceSensor(PinName ai, int profNum);
Hypna 1:8db052ec94f1 10 double getDistance();
Hypna 0:d03df6dd14d6 11
Hypna 0:d03df6dd14d6 12 private:
Hypna 0:d03df6dd14d6 13 AnalogIn voltage;
Hypna 1:8db052ec94f1 14 int prof;
Hypna 0:d03df6dd14d6 15 };
Hypna 0:d03df6dd14d6 16
Hypna 0:d03df6dd14d6 17 #endif