the MaxbotixLV sonar sensor interface software for analog. i2c and pwm will be added later.

Dependencies:   mbed

Committer:
kaushalpkk
Date:
Thu Jul 14 23:44:15 2011 +0000
Revision:
0:2c68f41f803d
Initial release works on the analog outputs from the sensor..
i2c and PWM will be added soon.

Who changed what in which revision?

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