I imagine that would be quite simple, yes. Assuming they are quite similar (you'll have to compare the data sheets to confirm), if you look at the code it is not doing all that much, so i'm confident you could get it working without too much trouble.
Simon
Hi Jorge,
I imagine that would be quite simple, yes. Assuming they are quite similar (you'll have to compare the data sheets to confirm), if you look at the code it is not doing all that much, so i'm confident you could get it working without too much trouble.
Simon
I imagine that would be quite simple, yes. Assuming they are quite similar (you'll have to compare the data sheets to confirm), if you look at the code it is not doing all that much, so i'm confident you could get it working without too much trouble.
Simon
I got it working flawlessly, no changes were required. The code and the pin-out are exactly the same. Thanks much.
<<quote simon>>
Hi Jorge,
I imagine that would be quite simple, yes. Assuming they are quite similar (you'll have to compare the data sheets to confirm), if you look at the code it is not doing all that much, so i'm confident you could get it working without too much trouble.
Simon
<</quote>>
I got it working flawlessly, no changes were required. The code and the pin-out are exactly the same. Thanks much.
{{/media/uploads/4180_1/id12breakout-01-l_i_ma.jpg}}
[[http://www.sparkfun.com/products/8423]] is a $.95 breakout board for both the ID-12 and ID-20 from Sparkfun. Pins are spaced 2mm and not .1 inch. They also sell the [[http://www.sparkfun.com/products/8419|ID-12]] and [[http://www.sparkfun.com/products/8628|ID-20]]. In the UK [[http://www.skpang.co.uk/catalog/advanced_search_result.php?keywords=RFID&osCsid=25a9f7ee109dbf5d3fcbf7d9e6d0ce21|SKPang]] also has them.
This is a great example, is there something similar for java. Someway to call it and read the input with mbed. Is is something similar to 'Interfacing With Java'?
Sorry for such novice questions, I know what I want to achieve from the setup but its the how to that is confusing me, very new I just received my mbed last week.
Thanks in Advance!
Hi Simon!
This is a great example, is there something similar for java. Someway to call it and read the input with mbed. Is is something similar to 'Interfacing With Java'?
Sorry for such novice questions, I know what I want to achieve from the setup but its the how to that is confusing me, very new I just received my mbed last week.
Thanks in Advance!
Hello Simon,
So I compiled the program in the mbed online compiler and it compiled with success. And I downloaded the bin file into mbed memory. But how do I see the output? Where does the RFID number appear? I am sorry I am still quite new with this and today is the first time I used the compiler here.
Thanks.
Hello Simon,
So I compiled the program in the mbed online compiler and it compiled with success. And I downloaded the bin file into mbed memory. But how do I see the output? Where does the RFID number appear? I am sorry I am still quite new with this and today is the first time I used the compiler here.
Thanks.
Hi guys,
so I figured out the terminal output issue. I was able to run the code and view the output in putty. But I am getting more issues.. the program runs, prints "Hello World" but when I try to read a 125khz rfid card, it doesn't print anything? I have the ID12 and have connected it exactly as you mention here. In fact me and some of my colleagues have worked on it together... still no read on the cards.. do you know what could be causing something like that? It might be an obvious thing, but I have never worked on RFID before..
Thanks guys, I am making slow progress, getting there day by day.. just so much new stuff..
Hi guys,
so I figured out the terminal output issue. I was able to run the code and view the output in putty. But I am getting more issues.. the program runs, prints "Hello World" but when I try to read a 125khz rfid card, it doesn't print anything? I have the ID12 and have connected it exactly as you mention here. In fact me and some of my colleagues have worked on it together... still no read on the cards.. do you know what could be causing something like that? It might be an obvious thing, but I have never worked on RFID before..
Thanks guys, I am making slow progress, getting there day by day.. just so much new stuff..
How can I use serial interrupt with this? I believe I need to modify the library and add a interrupt method but can't quite understand how exactly to do it
How can I use serial interrupt with this? I believe I need to modify the library and add a interrupt method but can't quite understand how exactly to do it
Previously, the ID Number read back was treated as a decimal number, not a HEX String,
My fix corrects this.
#include "ID12RFID.h"
#include "mbed.h"
ID12RFID::ID12RFID(PinName rx)
: _rfid(NC, rx) {
}
int ID12RFID::readable() {
return _rfid.readable();
}
int ID12RFID::read() {
while (_rfid.getc() != 2);
int v = 0;
_rfid.getc(); // drop 1st 2 bytes - we actually only read the lower 32-bits of the code
_rfid.getc();
for (int i=7; i>=0; i--) {
char c = _rfid.getc(); // a ascii hex char
int part = c - '0';
// test if 'Alpha'
if (part > 9) part -= 7; // Quick & dirty !
v |= part << (i * 4);
}
for (int i=0; i<5; i++) {
_rfid.getc();
}
return v;
}
Hope this is of use
Ceri
Just found and corrected a 'Bug' in RFID code,
Previously, the ID Number read back was treated as a decimal number, not a HEX String,
My fix corrects this.
<<code>>
#include "ID12RFID.h"
#include "mbed.h"
ID12RFID::ID12RFID(PinName rx)
: _rfid(NC, rx) {
}
int ID12RFID::readable() {
return _rfid.readable();
}
int ID12RFID::read() {
while (_rfid.getc() != 2);
int v = 0;
_rfid.getc(); // drop 1st 2 bytes - we actually only read the lower 32-bits of the code
_rfid.getc();
for (int i=7; i>=0; i--) {
char c = _rfid.getc(); // a ascii hex char
int part = c - '0';
// test if 'Alpha'
if (part > 9) part -= 7; // Quick & dirty !
v |= part << (i * 4);
}
for (int i=0; i<5; i++) {
_rfid.getc();
}
return v;
}
<</code>>
Hope this is of use
**Ceri
Hey, thanks very much to all out there for your help! This code does indeed work with the ID-20. It took a couple of hours to get to go and the datasheet was very helpful.
Thank you :o)
Hey, thanks very much to all out there for your help! This code does indeed work with the ID-20. It took a couple of hours to get to go and the datasheet was very helpful.
Thank you :o)
Gentelmen, I'm trying to use this code to create a program using VS 2012. I can "include" the "ID12RFID.h" file, but the "mbed.h" file is needed, and this only includes other libraries. I need this for the uni project. Could anyone help me with adapting this code? Many thanks
Gentelmen, I'm trying to use this code to create a program using VS 2012. I can "include" the "ID12RFID.h" file, but the "mbed.h" file is needed, and this only includes other libraries. I need this for the uni project. Could anyone help me with adapting this code? Many thanks
Please login to post comments.