ADC_LCD_RTC

Dependencies:   TextLCD mbed

Files at this revision

API Documentation at this revision

Comitter:
HarishMekali
Date:
Mon Feb 18 14:08:21 2013 +0000
Commit message:
ADC_LCD_RTC

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
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r bd8f447303a6 TextLCD.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TextLCD.lib	Mon Feb 18 14:08:21 2013 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/carlos_nascimento08/code/TextLCD/#ab287c4899bf
diff -r 000000000000 -r bd8f447303a6 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Mon Feb 18 14:08:21 2013 +0000
@@ -0,0 +1,23 @@
+#include "mbed.h"
+#include "TextLCD.h"
+ 
+TextLCD     lcd(p19, p20, p21, p22, p23, p24); // rs, e, d0-d3
+AnalogIn    a_in(p18);
+char time_stamp[16];//as our lcd is of 16 character it is so
+ 
+int main() 
+{
+    set_time(1361194897);
+    while (1) 
+    {
+        time_t seconds = time(NULL)+ 19800; // time(null) gives the GMT time .
+        strftime(time_stamp, 16, "%d%m%y%H%M%S", localtime(&seconds)); 
+        //this converts the value in seconds obtained above to human readable format and assigns it to the timestamp 
+        lcd.locate(0,0);//start displaying from zeroth column,zeroth row
+        lcd.printf("%s",time_stamp);//diplays the human readable time
+        lcd.locate( 0, 1 );
+        lcd.printf( "Temp=%0.3f", a_in * 3.3 * 100 );
+        wait( 1.0 );
+    }
+  
+}
\ No newline at end of file
diff -r 000000000000 -r bd8f447303a6 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Mon Feb 18 14:08:21 2013 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/0883845fe643
\ No newline at end of file