
ccc
Dependencies: HYT TextLCD mbed
Fork of HYT_example by
Diff: main.cpp
- Revision:
- 1:97c7fc5d4127
- Parent:
- 0:cd8ba9e5f346
--- 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);