Introduction: Arduino RFID Flash Cards (Matching Game)

Picture of Arduino RFID Flash Cards (Matching Game)

Want a fancy way to learn with your kids or study for the big test? With an RFIDuino shield, a stack of flash cards and a bunch of RFID tags, you can make a flash card system that gives feedback and reinforcement to the studying process! Let's get started!

Step 1: Project Parts List

Step 2: Get Your RFID Tag Data

Picture of Get Your RFID Tag Data

Grab the RFIDuino Library and example sketches here and place the RFIDuino folder in your arduino Libraries folder.

  1. Connect your RFIDuino as shown. (Click here for the v1.1 Connection Diagram)
  2. Open RFIDuino_helloworld onto your board. You can find this sketch under
    File>Examples>RFIDuino>RFIDuino_helloworld
  3. You will need to make sure the code is adjusted for your RFIduino hardware.
    v1.2 shields (2 pin antenna, 'REV 1.2' printed on the board) will need the following code
    RFIDuino myRFIDuino(1.2);     //initialize an RFIDuino object for hardware version 1.2
    v1.1 shields (4-pin antenna, no version number printed on the board) will need the following code
    RFIDuino myRFIDuino(1.1);     //initialize an RFIDuino object for hardware version 1.1

    Both lines of code are available in the RFIDuino_helloworld sketch, simply uncomment the one you don't need.

    If you are still unsure about what hardware you are using, see this page

  4. Connect a micro USB cable from your computer to your Geekduino
  5. Load RFIDuino_helloworld3 onto your board using the upload button in the Arduino IDE.
  6. Once loaded, you can leave your board connected to your computer - you will need this connection to power the board and to communicate with the computer
  7. Open the Serial Monitor.
    Tools -> Serial Monitor

    The serial monitor should be set to its default settings ('No Line ending', 9600 baud)

  8. Swipe a tag across the RFIDuino antenna. The green light will light up and your buzzer will make a noise.
  9. The Serial Monitor will display 5 numbers. These numbers make up the ID of your tag.
  10. Copy down these numbers for future use. It is advisable to scan one tag at a time, copy the ID to a document, and make a note in the document about what the tag is attached to. It can also be handy to write the ID on the flash card itself. NOTE: You will need the ID for all of your tags for the next step.

Step 3: Programming

  1. Your components will remain connected as they were in the last step.
  2. Open RFIDuino_flashCards. You can find this sketch under
    File>Examples>RFIDuino>RFIDuino_flashCards
  3. You will need to make sure the code is adjusted for your RFIduino hardware.
    v1.2 shields (2 pin antenna, 'REV 1.2' printed on the board) will need the following code
    RFIDuino myRFIDuino(1.2);     //initialize an RFIDuino object for hardware version 1.2
    v1.1 shields (4-pin antenna, no version number printed on the board) will need the following code
    RFIDuino myRFIDuino(1.1);     //initialize an RFIDuino object for hardware version 1.1

    Both lines of code are available in the RFIDuino_flashCards sketch, simply uncomment the one you don't need.

    If you are still unsure about what hardware you are using, see this page. The RFID Experimenter's Kit comes with the version 1.2 shield.

  4. Modify the code for the number of cards you want by editing line 66. For example, if you have 6 cards, use the code
    const int NUMBER_OF_CARDS = 3;     //number of cards that can be paired with another card.	

    In this line, you are stating how many pairs of cards there are to be matched.

  5. You will also need to modify the sketch to include the IDs of the tags that you want to include. These IDs can be found using the Hello World sketch. Find the block of code starting at line 76 - it looks like this.
    byte keyTag[NUMBER_OF_CARDS][5] ={
    byte lowerCaseTag[NUMBER_OF_CARDS][5] ={
    {128,0,72,35,76},   //a, Apple,       0
    {128,0,72,75,111},  //b, Basketball,  1
    {128,0,72,28,7},    //c, Cake,        2
    }; 		
    And at line 107, the matching set of cards is listed in the same way.
    byte upperCaseTag[NUMBER_OF_CARDS][5] ={
    {128,0,72,75,152},  //A, Apron,       0
    {128,0,72,70,93},   //B, Butterfly,   1
    {128,0,72,14,0},    //C, Car,         2
    }; 		

    replace the Tag IDs listed here with your own, and make sure to clearly label each of the tags so that there is no way to confuse them. Tags are paired by the order they are in these sets (ie: tag 2 in the first set will pair with tag 2 in the second set.)

  6. Connect a micro USB cable from your computer to your Geekduino
  7. Load RFIDuino_flashCards onto your board using the upload button int the Arduino IDE.
  8. Once loaded, you can open the serial monitor in the Arduino IDE for prompts.
  9. Swipe one of your cards from the first set. The buzzer will play 3 ascending notes, and the LED will switch to green on the shield. This lets you know that it is ready for the next card.
  10. Swipe any card that is not the correct matching card, and it will play 3 monotone notes letting you know you've swiped the wrong card. Swipe the correct matching card, and it will play 3 ascending notes and reset, allowing you to continue playing!

Step 4: You're Ready to Study!

At this point, you can use the default setup to match pairs, or you can improve upon the design! Since you have your choice of flash cards, this is useful for a wide variety of ages. We used an example of Alphabet matching cards, but if you are a medical student, this is a great way to help memorize anatomy and physiology! Adding lights is a great way to get feedback. You could even add a screen and a battery to make it portable! We'd love to see this thing in action!

Comments

About This Instructable

642views

12favorites

License:

Bio: The RobotGeek team is a 6-man operation that wants to make it even easier to use Arduino to make electronics and robots. Check out our ... More »
More by robotgeek_official:Dropping Halloween SpiderJumping Halloween SpiderWater Monkeys
Add instructable to: