I2CBMPREdBear

Dependencies:   BMP085 mbed

main.cpp

Committer:
Remitte
Date:
2015-09-24
Revision:
0:678a145039d1

File content as of revision 0:678a145039d1:

#include "mbed.h"
#include "BMP085.h"
 
BMP085 bmp085(P0_29, P0_28);
 
DigitalOut myled(LED1);
Serial pc(USBTX, USBRX);
 
int main() {
    float p, t;
 
    while(1) {
        myled = 1;
 
        bmp085.update();
        p = bmp085.get_pressure();
        t = bmp085.get_temperature();
        pc.printf("p:%6.2f hPa / t:%6.2f C\n", p, t);
 
        myled = 0;
        wait(3);
    }
}