udenokai sample

Dependencies:   TextLCD mbed

main.cpp

Committer:
marishi
Date:
2011-06-10
Revision:
0:7647fa87431f

File content as of revision 0:7647fa87431f:

//udenokai sample
#include "mbed.h"
#include "TextLCD.h"
TextLCD lcd(p24, p26, p27, p28, p29, p30); // rs, e, d4-d7
LocalFileSystem local("local");

const unsigned int MAX_LEN = 256;

int main()
{
    FILE *fp = fopen("/local/test.txt","r");
    if(NULL == fp){
        lcd.cls();
        lcd.printf("open error");
    }
    char str[MAX_LEN];
    fgets( str , MAX_LEN-1 , fp );
    
    lcd.cls();
    lcd.printf(str);
    
    fclose(fp);
}