4_LCD_With_Lib

Dependencies:   TextLCD mbed

Files at this revision

API Documentation at this revision

Comitter:
HarishMekali
Date:
Sun Oct 06 05:12:49 2013 +0000
Parent:
0:15a70393058f
Commit message:
LCD with Sensor value

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 15a70393058f -r 71e371ba55cd TextLCD.lib
--- a/TextLCD.lib	Fri Oct 04 18:28:36 2013 +0000
+++ b/TextLCD.lib	Sun Oct 06 05:12:49 2013 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/simon/code/TextLCD/#44f34c09bd37
+http://mbed.org/users/mamezu/code/TextLCD/#ffeb3e6c1367
diff -r 15a70393058f -r 71e371ba55cd main.cpp
--- a/main.cpp	Fri Oct 04 18:28:36 2013 +0000
+++ b/main.cpp	Sun Oct 06 05:12:49 2013 +0000
@@ -1,11 +1,18 @@
 
 #include "mbed.h"
 #include "TextLCD.h"
+AnalogIn s1(p18);
 
-TextLCD lcd(p25,p26, p21, p22, p23, p24); // rs, e, d4, d5, d6, d7
+TextLCD lcd(p19,p20, p21, p22, p23, p24); // rs, e, d4, d5, d6, d7
 
 int main() 
 {
+      while(1)
+      {
+      float x;
       lcd.cls();
-      lcd.printf("Hello BMS");
+      x=s1.read();
+      lcd.printf("Sensor value = %f",x);
+      wait(0.5);
+}
 }
\ No newline at end of file