test

Dependencies:   BME280 mbed

Fork of BME280_Hello by Toyomasa Watarai

main.cpp

Committer:
kityann
Date:
2015-08-06
Revision:
5:7778d3f394b8
Parent:
4:5a46e118c5f5

File content as of revision 5:7778d3f394b8:

#include "mbed.h"
#include "BME280.h"

Serial pc(USBTX, USBRX);

#if defined(TARGET_LPC1768)
BME280 sensor(p9, p10);
#else
BME280 sensor(I2C_SDA, I2C_SCL);
#endif

int main() {
    
    while(1) {
        pc.printf("%2.2f degC, %04.2f hPa, %2.2f %%\n", sensor.getTemperature(), sensor.getPressure(), sensor.getHumidity());
        wait(0.1);
    }
}