Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of BME280_Hello by
Diff: main.cpp
- Revision:
- 0:2c9585cecfde
diff -r 000000000000 -r 2c9585cecfde main.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Mon Apr 06 09:13:14 2015 +0000
@@ -0,0 +1,18 @@
+#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);
+ }
+}
