RFID with Propeller
codeking
Posts: 39
I'm new to Spin, so is there some .spin file I can download to use the parallax RFID reader? I did some searching on this forum, the parallax website, and google, but I could only find Basic Stamp files. Normally I would take the time to learn how to use it, but I have to get it to work in less than a week.
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
http://forums.parallax.com/showthread.php?p=574524
Example 22 shows the RFID reader connected to the Propeller with a TV display.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Mike
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
i see nothink for finish the first repeat (just after RFID.start )? So i think that your program loop infinitely on it (It will be the same for the next repeat).
I think that you need to add a QUIT in the IF
like that :
But it's probably not yet good because there are no waiting loop before the second 'IF RfidListener' block.
Best regards,
dro
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
in medio virtus
Post Edited (inservi) : 2/3/2007 6:15:23 PM GMT
I think the test 'IF RfidBuffer==0' is wrong because you test only one byte and the tag # readed can some time contain a 0 at this first ?
dro
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
in medio virtus
Here's my code for RfidListener:
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
-Theron Luhn
"There are two things that are infinate: Human Stupidity and the universe. I'm not sure about the latter." - Mark Twain
Post Edited (codeking) : 2/3/2007 6:09:54 PM GMT
dro
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
in medio virtus
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
-Theron Luhn
"There are two things that are infinate: Human Stupidity and the universe. I'm not sure about the latter." - Mark Twain
Witch RFID object do you using ?
I downloaded the 'RFID.Tag.ID.Demo - Archive [noparse][[/noparse]Date 2006.10.25 Time 12.42].zip'. In this objetct, it is possible to read 'RFIDbuffer' when a tag is reading simultaneously by RFID. That is not good because it is possible to read a tag # unfinished !
I think that we have to add a flag to the RFID object for indicate when is a valid reading finished. but that is not the more urgent stuff.
dro
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
in medio virtus
Post Edited (inservi) : 2/3/2007 6:34:33 PM GMT
and in your code some think like :
dro
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
in medio virtus
Post Edited (inservi) : 2/3/2007 8:26:45 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
-Theron Luhn
"There are two things that are infinate: Human Stupidity and the universe. I'm not sure about the latter." - Mark Twain
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
-Theron Luhn
"There are two things that are infinate: Human Stupidity and the universe. I'm not sure about the latter." - Mark Twain
As you see, the outa[noparse][[/noparse] 1 ]~~ (other than 0) appear as outa~~ without brace (because the HTML confusing).
Could-you resend the code with a space befor and after the subscript as : 'outa[noparse][[/noparse] 1 ] ' so the code appear complete.
And also the RFID object ?
Thanks,
dro
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
in medio virtus
Post Edited (inservi) : 2/5/2007 4:42:17 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
-Theron Luhn
"There are two things that are infinate: Human Stupidity and the universe. I'm not sure about the latter." - Mark Twain
Post Edited (codeking) : 2/6/2007 3:11:33 AM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
-Theron Luhn
"There are two things that are infinate: Human Stupidity and the universe. I'm not sure about the latter." - Mark Twain
At the first look, i don't locate the problem. I will now simulate for trace and after post the result. a few later (2 or 3 hour). As i don't have the RFID board, i must modifying the RFID object for send a code when i push a button ( at the same speed, about 2400 baud).
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
in medio virtus
The program look to be near ok for do what you want.
Here are the behavior: (if i well understand what you want)
-Recording badges
- waiting for read the first badge
- put the badge code 1 into id1 and light on led 1 ( port 0 )
- waiting for read the second badge
- put the badge code 2 into id2 and light on led 2 ( port 1 )
- blink all leds
-Reading badges
- waiting to read the badge 1 then light on led 1
There, it is probably an error in the code :
IF compare(@OldId,@Id1,10)
OUTA[noparse][[/noparse] 1 ]~~ ' you probably need to output hight the port 0 and not the port 1
- waiting to read the badge 2 then light on led 2
There, it is probably an error in the code :
IF compare(@OldId,@Id2,10)
OUTA[noparse][[/noparse] 0 ]~~ ' you probably need to output hight the port 1 and not the port 0
At the reading stage, you need to read the badges in the right order and not two time the same because into RfidListener, RfidBuffer must be different than OldId.
Is it realy that you want ?
dro
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
in medio virtus
My guess is that the problem is that RfidBuffer goes to some unexpected value. This is where plugging the prop into the TV would help for debugging. I'll see if I can get the right cable.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
-Theron Luhn
"There are two things that are infinate: Human Stupidity and the universe. I'm not sure about the latter." - Mark Twain
I think that you need to re-initialize 'RfidBuffer' also if the badge is readed a secon time
Here is the test code witch is working as you want i hope.
dro
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
in medio virtus
Post Edited (inservi) : 2/7/2007 1:19:52 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
-Theron Luhn
"There are two things that are infinate: Human Stupidity and the universe. I'm not sure about the latter." - Mark Twain
Your are welcome.
dro
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
in medio virtus
RoboGeek
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"I reject your reality and subsitute my own!"
Adam Savage, Mythbusters
www.parallax.com
www.goldmine-elec.com
www.expresspcb.com
www.startrek.com
·
About witch FindMatch method do you think ?
dro
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
in medio virtus
RoboGeek
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"I reject your reality and subsitute my own!"
Adam Savage, Mythbusters
www.parallax.com
www.goldmine-elec.com
www.expresspcb.com
www.startrek.com
·
In the DAT section, they are 7 tags ID defined for sample. The adresse of this table of tags is given by @START_OF_TAGS. (you must of course, type your tags IDs in this table)
FindMatch return the position number of readed tag in this table or 0 if the tag readed is not in this table.
If you have a tag with ID "0415AB6481" FindMatch will return 3
I hope that you can understand my poor English.
dro.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
in medio virtus
RoboGeek
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"I reject your reality and subsitute my own!"
Adam Savage, Mythbusters
www.parallax.com
www.goldmine-elec.com
www.expresspcb.com
www.startrek.com
·