version of BME28o test app built using mbed-os 5.4.3 verified working with mDot and sparkfun BN280 module
Fork of BME280_Hello by
main.cpp
- Committer:
- Roietronics
- Date:
- 2017-04-16
- Revision:
- 5:1d5da5d68064
- Parent:
- 0:2c9585cecfde
File content as of revision 5:1d5da5d68064:
#include "mbed.h"
#include "BME280.h"
Serial pc(USBTX, USBRX);
#if defined(TARGET_LPC1768)
BME280 sensor(p28, p27);
#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(1);
}
}
