Shop OBEX P1 Docs P2 Docs Learn Events
USB Datalogger used to handle RFID Database — Parallax Forums

USB Datalogger used to handle RFID Database

CruxCrux Posts: 74
edited 2007-10-12 16:04 in BASIC Stamp
Good day!!

I am planning on design a project. It involves a chunk of RFID database w/c an eeprom is not enough. I want to know if we could append time,names just in one file for that particular user. My design is some kind of an automated attendance system. I want to store all the e.g. students tags to the USB then my system will just seek through the USB stick if their tags are in the list otherwise they are not a valid student. Is this possible?if yes what are the requirements?advice is welcome

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-10-11 14:15
    Crux,

    The examples show how to read/write to a file. Naming it something with a .CSV extension will cause Excel to think it is a supported file type. You can save the data comma-delimited in the field-format you choose. When you need to verify a tag you will have to buffer the tag then read the file comparing each record’s tag field with the tag from the RFID Reader. Writing records isn’t a problem but getting the correct information in could be done by external PC or through some other method of entry. I am almost thinking a BS2p would be a better choice for this. It sounds relatively easy and is one of the Application Ideas we listed in the documentation for that very type of implementation. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • CruxCrux Posts: 74
    edited 2007-10-11 14:36
    So you are saying is that BS2 is too slow for this type of application and its not advisable for this one?I am not yet knowledgeable about this .CSV extension and data comma-delimited stuffs. Can you lead me to some tutorials or links so I could start reading it?
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-10-11 15:21
    Crux,

    Speed had nothing to do with my recommendation. I’m sorry I wasn’t more clear on that. The BS2p has Scratch Pad RAM which the BS2 does not. You could use the BS2 if your data doesn’t exceed the available RAM Array Space available. However on the BS2p the data could be up to 63 bytes (126 / 2 for both pieces of data to compare) and you would be able to work with larger records. It’s all in the formatting. This limitation could be overcome by formatting the records as line character delimited as one of the examples uses. Instead of commas you would actually put each piece of information on a separate line. A line of a certain character would separate the records. So you might have something like this:

    ****************
    0A2DB16C78
    Chris
    Savage
    6
    10110100
    ****************
    B25FAADC2E
    Dave
    Andreae
    4
    11010010
    ****************

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • UnsoundcodeUnsoundcode Posts: 1,532
    edited 2007-10-11 18:10
    Hi Crux, it sounds like an interesting project. I set up a database on a BS2 writing to a thumbdrive and you can run out of variable space real quick. I found a work around for this was to use a Folder system where the Folders contained files with "constant" names.

    For example if you had 10 students each with their own tag you would create 10 folders on the memory stick and each one of the folder names would be a tag number. Within each folder you would·create a file for a catergory, such as Fname.txt Lname.txt Time_In.txt Time_out.txt etc. containing the data specific for that user. That way once you have changed directory to the required tag number you only need one sub routine with the "constant" filenames to read/write for any tag number.

    If someone tried to use a tag that was not valid , in other words a folder that did not exist the logger would return the string "Bad Command" or "BC" depending on if you use ECS·or SCS. With a check for the "BC" string you can deny access or take other appropriate action.

    Using this method you can get by with an array of 12 bytes leaving quite a lot of variable space for other operations.

    Jeff T.
  • CruxCrux Posts: 74
    edited 2007-10-12 00:11
    Thanks.. I think BS2p is the answer for this,how about SX?would be advisable?I got still alot of questions but I have to try out first the stuffs you have mentioned.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-10-12 15:25
    Crux,

    Just remember, it can be done on a BS2 with minimal overhead with a little planning. It only took me a few moments to come up with something like what I posted which would work and reduce variable consumption. Limiting the max length of a field with each record is really the determining factor of how many bytes you need in the array.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2007-10-12 16:04
    Chris Savage

    ****************
    0A2DB16C78
    Chris
    Savage
    6
    10110100
    ****************

    B25FAADC2E
    Dave
    Andreae
    4
    11010010
    ****************


    Thanks for sharing this I would not thought of doing it that way

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ··Thanks for any·idea.gif·that you may have and all of your time finding them

    ·
    ·
    ·
    ·
    Sam
Sign In or Register to comment.