udenokai sample

Dependencies:   TextLCD mbed

Files at this revision

API Documentation at this revision

Comitter:
marishi
Date:
Fri Jun 10 16:06:05 2011 +0000
Child:
1:4b0cd1f19fd8
Commit message:

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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TextLCD.lib	Fri Jun 10 16:06:05 2011 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/simon/code/TextLCD/#44f34c09bd37
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Jun 10 16:06:05 2011 +0000
@@ -0,0 +1,27 @@
+//udenokai sample
+#include "mbed.h"
+#include "TextLCD.h"
+
+LocalFileSystem local("local");
+TextLCD lcd(p24, p26, p27, p28, p29, p30); // rs, e, d4-d7
+Serial pc(USBTX, USBRX); // tx, rx
+
+const unsigned int MAX_LEN = 256;
+
+int main()
+{
+    FILE *fp;
+    if( NULL == (fp = fopen("/local/test.txt","r"))){
+        pc.printf("open error");
+    }
+    
+    char str[MAX_LEN];
+    while( NULL != fgets( str , MAX_LEN-1 , fp ) )
+    //while( EOF != fscanf(fp,"%s",str) )
+    {
+        lcd.cls();
+        lcd.printf(str);
+        pc.getc();
+    }
+    fclose(fp);
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Fri Jun 10 16:06:05 2011 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/63bcd7ba4912