WIP

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
mnewton1
Date:
Sat Apr 06 17:18:41 2013 +0000
Commit message:
Work in progress.

Changed in this revision

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 2df1d679a1bd main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sat Apr 06 17:18:41 2013 +0000
@@ -0,0 +1,48 @@
+#include "mbed.h"
+
+unsigned char splash[] = //splash screen string
+{
+    254, 57, 51, //change baud rate to 19200
+    254, 88, //clear screen
+    254, 82, //auto scroll off
+    254, 71, 4, 2, //set cursor column 4, row 2
+    70, 111, 114, 109, 117, 108, 97, 32, 72, 121, 98, 114, 105, 100, //print "Formula Hybrid"
+};
+
+unsigned char data[] = //data screen initialization string
+{
+    254, 88, //clear screen
+    254, 72, //set cursor home
+    83, 112, 101, 101, 100, 32, 32, 32, 32, 32, 32, 58, //print "Speed: "
+    254, 71, 1, 2, //set curser to column 1, row 2
+    73, 67, 69, 32, 84, 101, 109, 112, 32, 32, 32, 58, 32, 32, 32, 32, 32, 32,//print "ICE Temp: "
+    254, 71, 1, 3, //set curser to column 1, row 3
+    72, 86, 32, 66, 97, 116, 116, 101, 114, 121, 32, 58, 32, 32, 32, 32,  //print "HV Battery: "
+    254, 71, 1, 4, //set curser to column 1, row 4
+    70, 117, 101, 108, 32, 76, 101, 118, 101, 108, 32, 58 //print "Fuel Level: "
+};
+
+   
+int main() 
+{
+    Serial lcd(p9, p10); // tx, rx
+    lcd.baud(19200);
+    
+    void loop();
+    {
+        for(int i = 0; i <= sizeof(splash); ++i)
+        {
+            lcd.putc(splash[i]);
+            wait(0.05);
+        }
+    
+        wait(5);
+    
+        for(int j = 0; j <= sizeof(data); ++j)
+        {
+            lcd.putc(data[j]);
+         wait(0.0001);
+        }
+        
+    }
+}
\ No newline at end of file
diff -r 000000000000 -r 2df1d679a1bd mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sat Apr 06 17:18:41 2013 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/3d0ef94e36ec
\ No newline at end of file