Skip to content

Commit

Permalink
Add arduino project and code to just get a tag ID
Browse files Browse the repository at this point in the history
  • Loading branch information
marksteward authored and root committed Sep 24, 2010
1 parent b4a2a82 commit 33b0e23
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 0 deletions.
25 changes: 25 additions & 0 deletions Doorbot_pde/Doorbot_pde.pde
@@ -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
}
}
}
43 changes: 43 additions & 0 deletions RFIDIOt-0.1x/gettag.py
@@ -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.