Permalink
Browse files

Add arduino project and code to just get a tag ID

  • Loading branch information...
1 parent b4a2a82 commit 33b0e2354e51e9fccd611f6686df9f3154667531 @marksteward marksteward committed with root Sep 24, 2010
Showing with 68 additions and 0 deletions.
  1. +25 −0 Doorbot_pde/Doorbot_pde.pde
  2. +43 −0 RFIDIOt-0.1x/gettag.py
@@ -0,0 +1,25 @@
+int triggerPin = 9;
+
+void setup()
+{
+ Serial.begin(9600);
+ pinMode(9, OUTPUT); // digital sensor is on digital pin 2
+}
+
+void loop()
+{
+ if (Serial.available() > 0) {
+ char inByte = Serial.read();
+
+ if (inByte == '1') {
+ // Strobe a little
+ for (int i = 0; i < 2; i++) {
+ digitalWrite(triggerPin, HIGH);
+ delay(100);
+ digitalWrite(triggerPin, LOW);
+ delay(30);
+ }
+ delay(500); // Pause to ensure it resets
+ }
+ }
+}
View
@@ -0,0 +1,43 @@
+#!/usr/bin/python
+
+# readtag.py - read all sectors from a standard tag
+#
+# Adam Laurie <adam@algroup.co.uk>
+# http://rfidiot.org/
+#
+# This code is copyright (c) Adam Laurie, 2006, All rights reserved.
+# For non-commercial use only, the following terms apply - for all other
+# uses, please contact the author:
+#
+# This code is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This code is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+
+
+import RFIDIOtconfig
+import sys
+import os
+
+try:
+ card= RFIDIOtconfig.card
+except:
+ os._exit(True)
+
+while True:
+
+ #card.info('readtag v0.1d')
+ card.select()
+ if card.uid is not None:
+ print '\nID: ' + card.uid
+
+
+
+
+os._exit(True)

0 comments on commit 33b0e23

Please sign in to comment.