Sensors
Diff: Sensors.h
- Revision:
- 0:5e6bde18bc44
diff -r 000000000000 -r 5e6bde18bc44 Sensors.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Sensors.h Thu Feb 28 15:54:42 2019 +0000 @@ -0,0 +1,73 @@ +#include "mbed.h" +#include "XBee.h" +#include "MODSERIAL.h" +#include "sstream" +#include "ADXL345_I2C.h" +#include "TextLCD.h" +#include "SDFileSystem.h" +#include "math.h" +#include "Setup.h" + +#define PI 3.14159265 + +const int HallAddress = 0xBC; //0x5E <<1; +const int HallAddressWrite = 0x1; +const int LCDaddress = 0x40; +//float AccData[4]; +//float MagData[4]; +//float Temp; +//float Bat; + +class Magnetic +{ +public: + Magnetic(); + I2C i2c; + void ReadMag(float *output); + +private: + +}; + +class Accelerometer +{ +public: + Accelerometer(); + ADXL345_I2C accelerometer; + void Init(); + void ReadAcc(float *output); + +private: + +}; + +class Battery; +class LCD +{ +public: + LCD(); + I2C i2c_lcd; + TextLCD_I2C lcd; + IO ioSetup; + void Readlcd(); + //////////////////////////////////LCD_RGB//////////////////////////////////////// + void LCDR(); + void LCDG(); + void LCDB(); + void LCDW(); + void LCDOFF(); + void RefreshLCD(float *AccData,float *Magdata); +private: + +}; + +class Battery +{ +public: + Battery(); + //Battery Measuring + AnalogIn Battery_Status; + /////////////////////////////////Battery Voltage///////////////////////////////// + float GetBatteryVoltage(); +private: +};