Shop OBEX P1 Docs P2 Docs Learn Events
Rfid first attempt. — Parallax Forums

Rfid first attempt.

XDERAJXXDERAJX Posts: 2
edited 2013-01-19 05:07 in Robotics
I am new to basic stamp 2 but ok at electronics. This is my starter project box it has a LCD ,rfid reader and the leds. I need a bs2 program to read the rfid and output to the lcd. I have used the rfid program on the paralax website and it doesn't work but I don't know anything I am doing in programming. I am not sure how to DEBUG it. There is also a photo of my robot control center the idea was based off of..Let me know what u think or if you can help my rfid Project. I want to make this into a device to unlock my car after i know what i am doing in programming.
20130118_164521.jpg
20130118_164912.jpg
20130118_164637.jpg
1024 x 768 - 83K
1024 x 768 - 72K
1024 x 768 - 74K

Comments

  • NWCCTVNWCCTV Posts: 3,629
    edited 2013-01-18 15:38
    Baby steps!!!! First, post the code you are having problems with and I am sure someone will chime in and help out. Get your RFID working and then move on to the next phase of your project.
  • Mike GreenMike Green Posts: 23,101
    edited 2013-01-18 19:16
    I would take things back a step further ... Get the sample program from the Parallax webpage on the RFID Reader working first, then modify it a step at a time to get it to do the rest of your project working. The sample program uses DEBUG statements to show what it's doing and what data it has read. Keep those for now, but add equivalent SEROUT statements to put the same information on your LCD. Experiment with LEDs as shown in the "What's a Microcontroller?" tutorial, then work those into your program. Eventually you will be able to remove the DEBUG statements and just use the LCD.
  • XDERAJXXDERAJX Posts: 2
    edited 2013-01-18 21:40
    I used the code on paralax web site but it doesn`t work..It detects the card and the led on the rfid switchs from red to green but the it doesnt enable the doorlock..so i was thinking the rfid number on the card is different from the one in the code...I have a lcd and changing the code to just put out the rfid number on the lcd.
  • Mike GreenMike Green Posts: 23,101
    edited 2013-01-19 05:07
    Every RFID tag has a different code. You have to change the numbers stored in the code to match what you have. In any event, the code is meant as a detailed example of how you would handle multiple tags and how you would read and match a tag number against a table of valid tags.

    Do you understand how to use the DEBUG statement? Do you understand how to use the SEROUT statement with your LCD? If not, then you need to spend some time with the "What's a Microcontroller?" tutorial learning some basics.

    The example code is unfortunately a bit complicated by statements like #IF / #ELSE / #ENDIF that compile different things depending on the Stamp model you're using. In the examples, the SERIN statement reads the tag into the string "str" for a BS2 which is probably what you have. You can use a DEBUG statement to display this string. Similarly, you can use a SEROUT statement to do the same thing with your LCD. If you're not sure how to use your LCD, read the documentation for it and the examples given in the documentation.
      HIGH Enable                                   ' deactivate reader
      DEBUG STR str\10,CR                    ' ***** Here's the debug statement *****
    Check_List:
    
Sign In or Register to comment.