,.

Dependencies:   AM2321 AQM0802 TextLCD mbed

Fork of mbed_AM2321 by yasuyuki onodera

Revision:
1:9fd96b49a05c
Parent:
0:45db9d35cbce
--- a/main.cpp	Wed Oct 08 02:51:23 2014 +0000
+++ b/main.cpp	Mon Dec 01 06:10:30 2014 +0000
@@ -9,8 +9,8 @@
 // http://einstlab.web.fc2.com
 //**********************
 #include "mbed.h"
-#include "AQM0802.h"
 #include "AM2321.h"
+#include "TextLCD.h"
 
 //#pragma O0
 //#pragma O1
@@ -37,8 +37,8 @@
 I2C i2c(D14,D15);
 #endif
 
-AQM0802 lcd(i2c);
 AM2321 am2321(i2c);
+TextLCD lcd(p21, p22, p23, p24, p25, p26); // rs, e, d4-d7
 
 int main() {
     
@@ -51,12 +51,12 @@
         h = am2321.humidity();
         sprintf(msg,"%4.1f%%",h/10.0);
         lcd.locate(0,0);
-        lcd.print(msg);
+        lcd.printf(msg);
 
         t = am2321.temperature();
         sprintf(msg,"%4.1fC",t/10.0);
         lcd.locate(0,1);
-        lcd.print(msg);
+        lcd.printf(msg);
 
         wait(1);
     }