Basic example showing how to use an m3pi with the RFID Reader attached

Dependencies:   mbed m3pi ID12RFIDIRQ

Files at this revision

API Documentation at this revision

Comitter:
nbbhav
Date:
Mon Mar 19 09:22:14 2012 +0000
Commit message:

Changed in this revision

ID12RFIDIRQ.lib Show annotated file Show diff for this revision Revisions of this file
m3pi.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
diff -r 000000000000 -r 9ec7501efec2 ID12RFIDIRQ.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ID12RFIDIRQ.lib	Mon Mar 19 09:22:14 2012 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/simon/code/ID12RFIDIRQ/#a740ea2424e5
diff -r 000000000000 -r 9ec7501efec2 m3pi.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/m3pi.lib	Mon Mar 19 09:22:14 2012 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/chris/code/m3pi/#4b7d6ea9b35b
diff -r 000000000000 -r 9ec7501efec2 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Mon Mar 19 09:22:14 2012 +0000
@@ -0,0 +1,30 @@
+// m3pi RFID Reader Example
+
+#include "mbed.h"
+#include "m3pi.h"     // m3pi robot controls
+#include "ID12RFID.h" // RFID reader library
+
+m3pi m3pi;
+
+// This is needed to access the RFID Reader...
+ID12RFID rfid(p14);
+
+int main() {
+
+    m3pi.locate(0,0);
+    m3pi.printf("RFIDRead");
+
+    while (1) {
+    
+        // Check if the reader is reading an ID?
+        if(rfid.readable()) {
+        
+            // Get the ID from the reader...
+            int id = rfid.read();
+
+            // Print it on the LCD...
+            m3pi.locate(0,1);
+            m3pi.printf("%d", id);
+        }
+    }
+}
diff -r 000000000000 -r 9ec7501efec2 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Mon Mar 19 09:22:14 2012 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/737756e0b479