Shop OBEX P1 Docs P2 Docs Learn Events
RFID Reader Module — Parallax Forums

RFID Reader Module

tkeenantkeenan Posts: 24
edited 2006-09-19 02:18 in BASIC Stamp
All,
·
I am trying to connect the read tag number to a variable that I can use in IF THEN statements.· I am not understanding very well how you can read from a table of known tags and go to different areas of your program.
·
Any ideas on how to do this?
·
Thanks
·
Tim

Comments

  • willthiswork89willthiswork89 Posts: 359
    edited 2006-09-16 18:14
    Tim,

    Go into you PBASIC file and look for LOOKUP or LOOKDOWN, much better then a if..then..else statement!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    -Learn somthing about everything, and Everthing about somthing-
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-09-17 02:09
    There is a demo/sample program for the RFID Reader that has a lookup table for names and tags.· Studying that should give you some ideas.· Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • tkeenantkeenan Posts: 24
    edited 2006-09-17 04:04
    Chris Savage (Parallax) said...
    There is a demo/sample program for the RFID Reader that has a lookup table for names and tags.· Studying that should give you some ideas.· Take care.

    I looked at the sample in great detail.· The trouble I am having is trying to figure out how to connect the read tag to a variable that can be used later in the program.

    Thanks for the help.

    Tim
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2006-09-17 20:18
    tkeenan
    You can look at what i done
    I am not sure if will help you any or not

    This a project where i need a·different routine for different cards this was the soilder station timer controler at this
    Post http://forums.parallax.com/showthread.php?p=595469

    And at this Post is where i learned how to write the routine
    http://forums.parallax.com/showthread.php?p=586138


    Tag1··········· DATA··· "04158DD890"·························· ' valid tags
    Tag2··········· DATA··· "04158DCE28"
    Tag3··········· DATA··· "04158DCA62"

    Name0·········· DATA··· "........STOP.........", CR, 0
    Name1·········· DATA··· "Tag 1 (15· MIN· CARD)", CR, 0
    Name2·········· DATA··· "Tag 2 (30· MIN· CARD)", CR, 0
    Name3·········· DATA··· "Tag 3 (1·· HOUR CARD)", CR, 0



    Tag_Found:
    ON tagNum GOSUB Routine0,· Routine1, Routine2, Routine3

    '
    [noparse][[/noparse]Card's Subroutines ]

    ' To use differnet Card for differnet amount of Time
    ' Card # 0 is fot Unauthorized CARD
    ' Card # 1 is fot 15 Minutes and 00 Seconds
    ' Card # 2 is fot 30 Minutes and 00 Seconds
    ' Card # 3 is fot 59 Minutes and 59 Seconds



    ·'15 Minutes CARD Routine
    ·Routine1:
    · mins=$00
    · secs=$00
    · GOSUB Set_Time
    · HIGH· led·································································· ' Turn ON Relay
    · DO
    ··· GOSUB Get_Time
    ··· IF mins=$15 AND secs=$00 THEN EXIT
    ·· DEBUG HOME, HEX2 mins, ":", HEX2 secs, CR
    ·· DEBUG CR, CR, "15 MIN CARD ", CR
    · LOOP
    · DEBUG CLS, CLS
    · LOW· led···································································· ' Turn OFF Relay
    · GOTO main

    I hope this helps you with what you want to

    Sam
  • tkeenantkeenan Posts: 24
    edited 2006-09-19 02:18
    Thats exactly what I was looking for.· Thanks very much for the program piece I was missing.· I am going to use different tags on my Christmas train to set of different sounds as the train travels down the track.

    Tim
Sign In or Register to comment.