

Give your Arduino the power to read and write RFID cards! Based on NXP's versatile MFRC522 chip, this module reads and writes MIFARE (ISO14443) compatible RFID devices - ubiquitous in most RFID access badges and access cards.
#Card writer module code#
Code samples in the reference are released into the public domain.RFID Reader/Writer Module for Arduino w/RFID Card The text of the Arduino reference is licensed under aĬreative Commons Attribution-ShareAlike 3.0 License.
#Card writer module how to#

#Card writer module windows#
The windows will report the device name of your SD card, it should look something like /dev/sdb1. Linux: With a SD card inserted, open a terminal window. To format a SD car without the extra files on OSX, follow these notes on Ladyada’s site. NB: OSX places a number of “hidden” files on the device when it formats a drive. Choose the Card, click on the erase tab, select MS-DOS(FAT) as the Format, and click Erase. OSX : Open Disk Utility (located in Applications>Utilities). Make sure you choose FAT as the filesystem. Windows : right click on your card’s directory and choose “Format” from the drop down. The process to format is fairly straightforward. The library supports the FAT16 and FAT32 filesystems, but use FAT16 when possible. You’ll need a SD reader and computer to format your card. It's not desirable to format SD cards frequently, as it shortens their life span. Formatting the card will create a file system that the Arduino can read and write to. Most SD cards work right out of the box, but it's possible you have one that was used in a computer or camera and it cannot be read by the SD library. (NB : whenever referring to the SD card, it means SD and microSD sizes, as well as SD and SDHD formats) Not all the functions are listed on the main SD library page, because they are part of the library's utility functions. Different boards use different pins for this functionality, so be sure you’ve selected the correct pin in SD.begin(). Note that even if you don't use the hardware SS pin, it must be left as an output or the SD library won't work.

Check later in the page for further information on SS pins for different shields. Please check which is the required pin for each different board and use that to call the SD.begin() function with the right parameter. The shields carrying an SD card memory slots place the SS pin differently. Those are the values that will be selected by default if no other pin specified in the call to SD.begin(). This pin is, in most Arduino boards, pin 10, pin 53 (on the Mega), or pin 17 (on the Micro). Microcontrollers implement an internal selection pin, known as SS or CS. Arduino Micro uses pins 14, 15, and 16.Īdditionally, another pin must be used to select the SD card. The Classic large format of the Mega uses pins 50, 51, and 52. Classic Arduino form factor (as in Uno, Leonardo, WiFi rev2) as well as the Classic Nano, Nano Every, Nano 33 IoT, and Nano 33 BLE implement the SPI on digital pins 11, 12, and 13. This communication method is implemented on different pins depending on the board family. The communication between the microcontroller and the SD card uses the SPI protocol. Some things to keep in mind when using the SD Library Overview
