ccc

Dependencies:   HYT TextLCD mbed

Fork of HYT_example by Ksenia Kondrashova

Files at this revision

API Documentation at this revision

Comitter:
jw17594
Date:
Tue Aug 28 03:26:13 2018 +0000
Parent:
0:cd8ba9e5f346
Commit message:
???

Changed in this revision

TextLCD.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r cd8ba9e5f346 -r 97c7fc5d4127 TextLCD.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TextLCD.lib	Tue Aug 28 03:26:13 2018 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/simon/code/TextLCD/#308d188a2d3a
diff -r cd8ba9e5f346 -r 97c7fc5d4127 main.cpp
--- a/main.cpp	Wed Sep 14 15:54:13 2016 +0000
+++ b/main.cpp	Tue Aug 28 03:26:13 2018 +0000
@@ -1,16 +1,10 @@
 #include "mbed.h"
 #include "HYT.h"
-
+#include "TextLCD.h"
+TextLCD lcd(p15, p16, p17, p18, p19, p20);
 Serial              pc(USBTX, USBRX);
 Ticker              timeKeeping;
-// for SLSTK3400A board
-HYT                 SENSOR (PD6, PD7); // sda, scl
-// for WIZwiki-W7500P board
-//HYT               SENSOR (D14, D15); // sda, scl
-// for ATSAMD21-XPRO board
-//HYT               SENSOR (PA08, PA09); // sda, scl
-
-
+HYT                 SENSOR (p9, p10); // sda, scl
 // HYT sensor polling cycle
 void dataUpdate(void)
 {
@@ -23,8 +17,9 @@
     pc.printf("Humidity level: %.1f\r\n%", SENSOR.humidity);
     pc.printf("Temperature level: %.1f\r\n%", SENSOR.temperature);
     pc.printf("-------------------------------\r\n%", SENSOR.temperature);
+    lcd.locate(1,0);
+    lcd.printf("Humidity level: %.1f\r\n%", SENSOR.humidity);
 }
-
 int main()
 {
     timeKeeping.attach(&secondsCallback, 1.0f);