In this tutorial we will use the RFIDuino Logger Program to log basic data from the RFIDuino/Geekduino.
If you haven't already, make sure to go through the RFIDuino Getting Started Guide to get your libraries and hardware setup.
- Connect your components as shown here.
RFIDuino_csv_loggeronto your board. You can find this sketch under
- You will need to make sure the code is adjusted for your RFIduino hardware. By default
RFIDuino_csv_loggeris setup for the newest version of the RFIDuino shield (1.2).
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.2v1.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.1Both lines of code are available in the
RFIDuino_csv_loggersketch, 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.
- Swipe any of the 'key' tags across the RFIDuino antenna. The green light will light up and your buzzer turn on for 100 milliseconds, then turn off.
- You can test your code further by opening the Serial Monitor
File -> Serial MonitorAnd setting the baud rate to
38400. Now scan your tag and you should see a number come up on the screen. This is the 4-byte version of your tag ID.
- If you don't already have the Chrome Browser installed on your computer, Go Here to install it
- In Chrome, go to this page on the Chrome Webstore.
+ Add To Chrometo install the RobotGeek RFIDuino Logger
- Allow Access for the Chrome App to your system
- You can always type
chrome://apps/in your browser to get to your Chrome App launcher page. From This page just Click the
RobotGeekicon to launch the program
- From the Drop-Down menu, pick the serial port that you used to program your Geekduino.
- Click 'Connect' to open a connection
- Every time you swipe a tag, the computer will record the tag ID and append the current time
Clear Logto clear the records
Export to Diskto save the records as a .csv file. You can open this file in Excel / other spreadsheet programs.
This code is a modified version of the
RFIDuino_helloworld code. This time however, instead of displaying tag IDs as the 5-bytes that make up the tag ID, we're only using the lower 4 bytes of the Tag ID. This is for two reasons:
- The first byte, the 'Vendor ID' is often ignored as similar cards usually have the same first byte
- Using a 4-byte number allows us to store the tag id in a single
This code uses the
<< (Bitshift Left) operator to move shift the higher 3 bytes, and then adds all of the bytes together into a single
The source code for the Chrome App can be found here. You can modify the look and function of the app to suit your needs. The App is very simple, but you could add features like database functionality (to associate names to ID numbers) or live updates to online data storage (dropbox, google sheets)
You can also use a RFIduino Wireless Upgrade Kit to wirelessly send data from the RFIduino to your computer.
It is also possible to make the RFIduino a standalone logger, and then save the logs back to the computer at a later time. For storing the data you can use EEPROM for small logs (~100 ID/Timestamp entries) or an SD card for larger entries.
One of the biggest difficulties with standalone loggers is an effective timestamp. The Geekduino can count time since the beginning of its operation using the
millis() function. But the Geekduino doesn't have a true idea of when it started in time. Also, the crystal in the Geekduino will lose a few seconds over a week. This problem is usually overcome with a piece of hardware called a Real Time Clock(RTC). This device is battery operated and keeps track of time very accurately. The Geekduino can query the RTC to get a time to associate with the log.
RFIDuino Functions used in this example
PC Control These demos and projects allow the robot to be controlled via a computer.
ArbotiX Commander Control - These demos and projects control the Robot using the ArbotiX Commander, the handheld Arduino based remote control.
Direct Control - These demos and projects control the Robot directly from sensors connected directly to the Robot's control board.
Pose Control - These demos and projects allow you to create and playback a sequence of poses.
Serial Control - These demos and projects control the robot using a serial packet protocol.
Standalone - These demos and projects are deisgned to let your robot function without a computer or additional microcontroller.
Wireless Control - These demos and projects allow you to control the robot wirelessly - usually by replacing the Serial Connection with XBee modules.
Reference - These articles have technical details regarding the control and operation of the robot.
More info here