Josef Humer
/
BuNuc_BME280_C02
Hello program for BME280 library
Diff: main.cpp
- Revision:
- 4:07413c4d0b80
- Parent:
- 0:2c9585cecfde
--- a/main.cpp Fri Jun 26 06:42:06 2015 +0000 +++ b/main.cpp Wed Jan 08 16:05:58 2020 +0000 @@ -1,17 +1,19 @@ +/* ********************************************************** */ +/* *************** Projekt: BuNuc_BME280_C02 **************** */ +/* BULME Graz, Abteilung Elektronik und Technische Informatik */ +/* ********************************************************** */ #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() { +int main() +{ - while(1) { + while(1) + { pc.printf("%2.2f degC, %04.2f hPa, %2.2f %%\n", sensor.getTemperature(), sensor.getPressure(), sensor.getHumidity()); wait(1); }