test

Dependencies:   DS3231 RHT03 TextLCD mbed

Fork of project by Jennares Yutthaseree

Files at this revision

API Documentation at this revision

Comitter:
fookies
Date:
Sat May 23 04:58:25 2015 +0000
Parent:
0:894306d5cad7
Commit message:
ssss

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 894306d5cad7 -r ae97d85a47dd main.cpp
--- a/main.cpp	Fri May 22 14:25:00 2015 +0000
+++ b/main.cpp	Sat May 23 04:58:25 2015 +0000
@@ -6,6 +6,7 @@
 TextLCD_I2C lcd(&i2c,0x4E,TextLCD::LCD16x2);
 DS3231 rtc(D14,D15);
 RHT03 rht(D13);
+DigitalOut p1(D3),p2(D4),p3(D5),p4(D6),p5(D7),p6(D9),p7(D10),p8(D11);
 
 int main()
 {
@@ -36,6 +37,19 @@
         lcd.printf("Hum:%.1f",Hum);
         wait(3);
         
+        lcd.cls();
+        lcd.setAddress(0,0);
+        lcd.printf("Port1:%3s Port2:%3s",(p1==1)?"On":"Off",(p2==1)?"On":"Off");
+        lcd.setAddress(0,1);
+        lcd.printf("Port3:%3s Port4:%3s",(p3==1)?"On":"Off",(p4==1)?"On":"Off");
+        wait(3);
+        
+        lcd.cls();
+        lcd.setAddress(0,0);
+        lcd.printf("Port5:%3s Port6:%3s",(p5==1)?"On":"Off",(p6==1)?"On":"Off");
+        lcd.setAddress(0,1);
+        lcd.printf("Port7:%3s Port8:%3s",(p7==1)?"On":"Off",(p8==1)?"On":"Off");
+        wait(3);
     }