LCD display, Teraterm display

Dependencies:   ID12RFID ID12RFID_HelloWorld TextLCD mbed

Fork of ID12RFID_HelloWorld by Simon Ford

Files at this revision

API Documentation at this revision

Comitter:
nmoorthy2001
Date:
Sat May 09 09:29:16 2015 +0000
Parent:
1:2c017f3d2d04
Child:
3:61e6bd867047
Commit message:
Made changes to include 16x2 LCD display and display on teraterm.

Changed in this revision

ID12RFID_HelloWorld.lib Show annotated file Show diff for this revision Revisions of this file
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/ID12RFID_HelloWorld.lib	Sat May 09 09:29:16 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/simon/code/ID12RFID_HelloWorld/#2c017f3d2d04
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TextLCD.lib	Sat May 09 09:29:16 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/simon/code/TextLCD/#308d188a2d3a
--- a/main.cpp	Tue Nov 23 17:17:56 2010 +0000
+++ b/main.cpp	Sat May 09 09:29:16 2015 +0000
@@ -1,15 +1,45 @@
-// Hello World for printing RFID tag numbers
+//  Program for reading and matching RFID tags
 
 #include "mbed.h"
-#include "ID12RFID.h"
+#include "TextLCD.h"
+
+Serial rx(NC, PTA1); // uart rx
+Serial pc(USBTX, USBRX);
+TextLCD lcd(PTA13, PTD5, PTD0, PTD1, PTD2, PTD3, TextLCD::LCD16x2); // RS, E, D4-D7
+
 
-ID12RFID rfid(p14); // uart rx
+int count = 0;
+int input[12];
+bool flag = 0;
+
+int main() 
+{
+    pc.printf("Welcome to RFID Access\n");
+    lcd.locate(0,0);
+    lcd.printf("RF ID:");
+    
+    rx.baud(9600);
 
-int main() {
-    printf("Hello World\n");
-    while(1) {
-        if(rfid.readable()) {
-            printf("RFID Tag number : %d\n", rfid.read());             
+    while(1) 
+    {
+    /*  if (rx.readable()) 
+        {
+            pc.printf("%02x\n", rx.getc());
+        }
+    */
+
+        if(rx.readable()) 
+        {
+            count = 0;
+            while(rx.readable() && count < 12)  
+            {
+                input[count] = rx.getc();
+                pc.printf("%d  %c\n", count, input[count]);
+                lcd.locate(count,1);
+                lcd.putc(input[count]);
+                count++;       
+            }
         }
     }
+
 }
--- a/mbed.bld	Tue Nov 23 17:17:56 2010 +0000
+++ b/mbed.bld	Sat May 09 09:29:16 2015 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/mbed/builds/029aa53d7323
+http://mbed.org/users/mbed_official/code/mbed/builds/487b796308b0
\ No newline at end of file