It is a door opener with mbed and Felica(RFID).
Dependencies: mbed Servo SDFileSystem
Diff: main.cpp
- Revision:
- 2:51b3c5ba45f0
- Parent:
- 1:26e3869ba544
- Child:
- 3:046e6f173f9e
diff -r 26e3869ba544 -r 51b3c5ba45f0 main.cpp --- a/main.cpp Fri Dec 23 03:58:47 2011 +0000 +++ b/main.cpp Fri Dec 23 06:36:59 2011 +0000 @@ -13,17 +13,22 @@ int main() { lcd.printf("Hello World\n RFID_doorlock"); printf("hello world"); + wait(1); + lcd.cls(); + lcd.printf("opening files now..."); FILE *fp = fopen("/sd/rdoor/userlist.txt", "r"); //user list(sd) FILE *fp2 = fopen("/sd/rdoor/log.txt", "a"); //logfile(sd) fprintf(fp2, "Power source is turned on now") ;//power on log + wait(1); if (fp == NULL) { - error("could not read USERLIST.TXT\n"); lcd.cls(); //gamen no syokika lcd.printf("could not read USERLIST"); fprintf(fp2, "could not read USERLIST.TXT\n"); //readerror log + error("could not read USERLIST.TXT\n"); + } else { + lcd.printf("Completed opening files!!"); } - fclose(fp); fclose(fp2);