All cards fall into two groups, command cards and num cards, like pic 1.
Code used in this project has been uploaded to Github. Find it here: https://github.com/loovee/NFC_ShieldBot_Demo
Open Arduino IDE, Follow the path: File --> Preferences, then the dialog in pic 2 will pop up:
Confirm that the “Sketchbook location” is the location you store the code from Github. Click “OK” to close the dialog. Reopen Arduino IDE, find sketch we need via: File --> Sketchbook --> uart_write_card, like pic 3.
Upload this sketch to the Seeeduino used in the remote. Now open a serial tool to test if the sketch run correctly. Put the card “GO AHEAD” near the antenna of NFC shield. Enter “1” in the serial tool, and send it out, like pic 4.
Just it, we finish the setting job of “GO AHEAD” card. And can move on to the next card.
Why we write “1” into it? Actually we don’t need to write the whole command into a card. All we need is separate them from each other and left the switching job to the Shield Bot. So as long as we program the Shield Bot to execute the action “GO AHEAD” when it receives command “1”, then it’s ok.
Here is a table illustrates the relationship of the content of NFC card and command.