asdf

Dependencies:   L3GD20 LSM303DLHC mbed

Headers/Sensors.h

Committer:
goy5022
Date:
2014-04-03
Revision:
2:997f57aee3b7
Parent:
1:cfe6a6ad8dca
Child:
3:1a8a7cc709cc

File content as of revision 2:997f57aee3b7:

#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()
{
    return frontExpAvg.average() > .90;
}
bool wallLeft()
{
    return SenseL.read() > .94;
}
bool wallRight()
{
    return SenseR.read() > .94;
}
#endif