asdf
Dependencies: L3GD20 LSM303DLHC mbed
Headers/Sensors.h
- Committer:
- goy5022
- Date:
- 2014-04-03
- Revision:
- 3:1a8a7cc709cc
- Parent:
- 2:997f57aee3b7
- Child:
- 4:ecfe2115e9a4
File content as of revision 3:1a8a7cc709cc:
#ifndef SENSORS_H #define SENSORS_H //#include "Core.h" #include "ExponentialAverage.h" #include "L3GD20.h" #include "LSM303DLHC.h" float ax, ay, az; float mx, my, mz; float gx, gy, gz; L3GD20 gyro(p9, p10); LSM303DLHC compass(p9, p10); PwmOut ledF(p23); PwmOut ledR(p21); PwmOut ledL(p22); AnalogIn SenseR(p15); AnalogIn SenseL(p16); AnalogIn SenseF(p17); bool wallfront = false; bool wallright = false; bool wallleft = false; bool wallFront() { return frontExpAvg.average() > .90; } bool wallLeft() { return SenseL.read() > .94; } bool wallRight() { return SenseR.read() > .94; } #endif