a library to read sonar values with the MaxbotixLV sonar range sensors..

Committer:
kaushalpkk
Date:
Fri Jul 15 14:19:14 2011 +0000
Revision:
0:b99b1e0e3290
works fine with analog input.. i2c and uart will be updated

Who changed what in which revision?

UserRevisionLine numberNew contents of line
kaushalpkk 0:b99b1e0e3290 1 #ifndef MBED_MAXBOT_H
kaushalpkk 0:b99b1e0e3290 2 #define MBED_MAXBOT_H
kaushalpkk 0:b99b1e0e3290 3
kaushalpkk 0:b99b1e0e3290 4 #include "mbed.h"
kaushalpkk 0:b99b1e0e3290 5
kaushalpkk 0:b99b1e0e3290 6 class MaxbotixLV{
kaushalpkk 0:b99b1e0e3290 7 public:
kaushalpkk 0:b99b1e0e3290 8 MaxbotixLV(PinName analogIN);
kaushalpkk 0:b99b1e0e3290 9 void setVoltage(float voltIn);
kaushalpkk 0:b99b1e0e3290 10 void setScale(float scaler);
kaushalpkk 0:b99b1e0e3290 11 float getAnalog();
kaushalpkk 0:b99b1e0e3290 12 float getInches();
kaushalpkk 0:b99b1e0e3290 13
kaushalpkk 0:b99b1e0e3290 14 protected:
kaushalpkk 0:b99b1e0e3290 15 AnalogIn _analogIn;
kaushalpkk 0:b99b1e0e3290 16 float _voltIn;
kaushalpkk 0:b99b1e0e3290 17 float _scaler;
kaushalpkk 0:b99b1e0e3290 18 };
kaushalpkk 0:b99b1e0e3290 19
kaushalpkk 0:b99b1e0e3290 20 #endif