BMP085 Sparkfun class
main.cpp
- Committer:
- mr63
- Date:
- 2013-10-02
- Revision:
- 0:2ae3dabe45e8
File content as of revision 0:2ae3dabe45e8:
#include "mbed.h" #include "BMP085.h" const int SlaveAddressI2C = 0xEE; //This is the slave address of the device Serial pc(USBTX, USBRX); BMP085 Sensor(SlaveAddressI2C, p28, p27, p21); int main() { Sensor.GetCalibrationData(); while(1) { pc.printf("Temp=%d deg C\n\r",Sensor.calculate_tempc()); pc.printf("Pressure=%dkPa\n\r",Sensor.calculate_pressure()); wait(1); } }