,.

Dependencies:   AM2321 AQM0802 TextLCD mbed

Fork of mbed_AM2321 by yasuyuki onodera

Files at this revision

API Documentation at this revision

Comitter:
morinagatomoya
Date:
Mon Dec 01 06:10:30 2014 +0000
Parent:
0:45db9d35cbce
Commit message:
ui

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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TextLCD.lib	Mon Dec 01 06:10:30 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/simon/code/TextLCD/#e4cb7ddee0d3
--- 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);
     }