RFID Project

Hello, just to let you know that i have running an app in the cloud (webfaction) that uses the imp and an rfid reader to control outside workers in my company
It uses websockets to update the webpage in real time

So far its doing fine.
See attached photos of my baby



.

That looks so cool.

Will you be making it into a door-access system?

no.
Just to log user in/out the company and in case of security procedures , to know where people are.
We will have beside entrante points, meeting points(in case of evacuation) with imp+rfid readers.

Very cool way to track your things people!

Still cool :slight_smile:

Which RFID reader did you use, what protocol and what type of tags?

13.56Mhz reader

link here
http://www.ebay.com/itm/13-56MHZ-New-RFID-Reader-Writer-Module-/270853094014?pt=LH_DefaultDomain_0&hash=item3f101a3a7e

its has uart or i2C but i didnt find docs about i2c so i used uart

i can be programmable.
I use it in 2 diferent way

1 when card detected, send tag via uart. This is what i use in this project.

2 when card detected , change mode to detect card leave, so this can be used like a hotel room , when card over reading area power on electricity, as soon as card leaves the area, power off electricity.
I have this configuration to control access to a printer by authorized workers

that looks good, will you be releasing some or all of the code?

the imp code is simple it has to collect all bytes and as soon as it has four groups like
AB CC DE 01

it calls my app webservice to process it.

I can post my imp code but the IDE is not showing my models/devices.
Is there a problem with the web IDE?

my code for the option 2.
( the option 1 is obvious reading this code)

first i write \x02 to detect id card
when i have the card id i write \x01 to detect card leave
When card leave i set again to first state \x02
`
local tag=[1,2,3,4];
local indextag=0;
local id="";
function cardleave()
{
local b = rfid.read();
// server.log(b);
while (b != -1) {
server.log(b+1);
if (b==254){ //254 is the read value when card leaves the detecting range
server.log(“card removed”);
agent.send(“OUT”,“emb”);
rfid.configure(9600, 8, PARITY_NONE, 1, NO_CTSRTS, detectcard);
rfid.write("\x02");
}
else{
server.log(“keep reading”);

    }
    b = rfid.read(); 
}

}
function detectcard()
{
local b = rfid.read();
// server.log(b);
while (b != -1) {
//ledon() ;
if (indextag==3){
tag[indextag]=b;
indextag=0;
server.log(tag[0]+" “+tag[1]+” “+tag[2]+” “+tag[3]);
agent.send(“IN”,tag[0]+” “+tag[1]+” “+tag[2]+” “+tag[3]);
rfid.configure(9600, 8, PARITY_NONE, 1, NO_CTSRTS, cardleave);
rfid.write(”\x01");

    }
  else{
        tag[indextag]=b;
        indextag+=1;  
  }
    b = rfid.read();
}

}

rfid <- hardware.uart12;
rfid.configure(9600, 8, PARITY_NONE, 1, NO_CTSRTS, detectcard);
rfid.write("\x02");

`

I’m more interested in your webapp code - would you mind sharing the source to it?

I´m sorry but is my company property, i would have to ask for permission and i know the answer -> NO.

but basicaly i use web2py, and tornado for websockets messaging to update the browser automatically.

The main code is python if you are in to it

I has near 3 thousand lines of code