Condensation Monitor Measure the current environment condition at outside and inside and make caution or warnings related to condensation. Support UART over BLE. It works with nRF Toolbox. 結露モニタ 屋内外の環境情報を計測し、結露に関する警告あるいは注意を出力します。 nRF Toolboxと一緒に動作し、UART機能でBLE経由でメッセージを出力します。 ドキュメント https://developer.mbed.org/users/takafuminaka/notebook/information-about-my-condensation-monitor-for-mbed/

Dependencies:   AQM0802 BME280 HDC1000 VaporCondition mbed BLE_API nRF51822 BLE_Condensation_Monitor

Dependents:   BLE_Condensation_Monitor

Fork of Condensation_Monitor by Nakatafu ☆

Revision:
0:6434ef883399
Child:
1:1cf4309871b7
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Jan 28 08:56:47 2015 +0000
@@ -0,0 +1,53 @@
+//**********************
+// Hygrometer and Thermometer for mbed
+//
+// LPC1768 flash=512KB, ADC=12bits
+// LPC11U35 flash=64KB, ADC=10bits
+// Nucleo ADC=12bits
+//
+// (C)Copyright 2015 All rights reserved by Y.Onodera
+// http://einstlab.web.fc2.com
+//**********************
+#include "mbed.h"
+#include "AQM0802.h"
+#include "HDC1000.h"
+
+#if defined(TARGET_LPC1768)
+I2C i2c(p28,p27);
+#endif
+// for TG-LPC11U35-501
+#if defined(TARGET_LPC11U35_501)
+I2C i2c(P0_5,P0_4);
+#endif
+// for Nucleo
+#if defined(TARGET_NUCLEO_F401RE)
+I2C i2c(D14,D15);
+#endif
+
+AQM0802 lcd(i2c);
+HDC1000 hdc1000(i2c);
+
+int main() {
+    
+    char msg[10];
+    float h;
+    float t;
+      
+    while(1) {
+
+        h = hdc1000.humidity();
+        h = h/0x10000*100;
+        sprintf(msg,"%4.1f%% ",h);
+        lcd.locate(0,0);
+        lcd.print(msg);
+
+        t = hdc1000.temperature();
+        t = t/0x10000*165-40;
+        sprintf(msg,"%4.1fC ",t);
+        lcd.locate(0,1);
+        lcd.print(msg);
+
+        wait(1);
+    }
+
+}