Shop OBEX P1 Docs P2 Docs Learn Events
Serin data from a barcode scanner — Parallax Forums

Serin data from a barcode scanner

Eric REric R Posts: 225
edited 2004-08-24 06:43 in BASIC Stamp
Just in the initial stages planning a project using serial data from a barcode scanner. I am lucky enough to have control of the·data for a clean six digit output. My plans are to serin the data (ie 123456) and compare it to a database. If a barcode passes that matches a code in the database, I will then activate a series of air solenoids to acomplish a task. If the barcode does not match the database then the item will continue down the line.
My question is, would this data be best handled with a series of "IF=" statements of a "lookdown" table? I figure that I will have less than a dozen codes in this database but will need to update it as time goes on. Is there a better way to handle this data?

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-08-24 06:43
    I did a similar program that would read 1-Wire serial numbers and compare them to known SNs in a database (DATA statements). Download our documentation for the NX-1000-24/40 board to see that code; it will probably help you.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office
Sign In or Register to comment.