Please see all COVID-19 updates here as some shipments may be delayed due to CDC safety and staffing guidelines. If you have an order or shipping question please refer to our Customer Support page. For technical questions please check out our Forums. Thank you for your continued support.

Member #339397

Member Since: July 19, 2012

Country: United States

  • /* hello guys if you have MEGA 2560 YOU NEED TO DO THIS STEPS IN ORDER YOU READ THE TAGS ALL ITS THANKS TO (Michelle) for her support in SparkFun Electronics

    the code its here which have been modified a little in order to make this works dont forget that you need jumpers to run from the rfid eval to Arduino

    / /

    rfid arduino RST RESET 3.3V 3.3V 5V 5V GND GND GND GND VIN VIN A0 A0 A1 A1 A2 A2 A3 A3 A4 D20

    A5 D21

    AREF AREF GND GND D13 D13 D12 D12 D11 D11 D10 D10 D9 D9 D8 D51 D7 D50 D6 D6 D5 D5 D4 D4 D3 D3 D2 D2 TX0->1 TX0->1 RX0->0 RX0->0 */

    /* RFID Eval 13.56MHz Shield example sketch with Value Block Read/Writev10

    Aaron Weiss, aaron at sparkfun dot com
    Read/Write Capabilities added by NPoole
    OSHW license: http://freedomdefined.org/OSHW

    works with 13.56MHz MiFare 1k tags

    Based on hardware v13: D7 -> RFID RX D8 -> RFID TX D9 -> XBee TX D10 -> XBee RX

    Note: RFID Reset attached to D13 (aka status LED)

    Note: be sure include the NewSoftSerial lib, http://arduiniana.org/libraries/newsoftserial/

    Usage: Sketch prints 'Start' and waits for a tag. When a tag is in range, the shield reads the tag, blinks the 'Found' LED and prints the serial number of the tag to the serial port. It then attempts to authenticate memory block 0x01. If this is successful it will display the "Success" status message and the contents of memory block 0x01. It will then ask for a 4-byte input to write to the tag. After receiving a 4-byte input, it will attempt to write this data to the tag and return the write status.

    This code uses the default transport key to authenticate the Value Block 0x01. If you have already written a key to this block in your MIFARE tag, the code may not work properly.



    NewSoftSerial rfid(50, 51);

    //Prototypes void check_for_notag(void); void halt(void); void parse(void); void print_serial(void); void read_serial(void); void seek(void); void set_flag(void); void authenticate(void); void write_Block(void);

    //Global var int flag = 0; int Str1[11]; int Str2[11]; int Str3[11]; int Str4[11]; int Str5[4];

    char in1 = 0; char in2 = 0; char in3 = 0; char in4 = 0;

    int chksum;

    int flag2 = 0;

    byte auth = 76;

    //INIT void setup()
    { Serial.begin(9600); Serial.println("Start");

    // set the data rate for the NewSoftSerial ports // xbee.begin(9600); rfid.begin(19200); delay(10); halt(); }

    //MAIN void loop()
    { read_serial(); }

    void check_for_notag() { seek(); delay(10); parse(); set_flag();

    if(flag = 1){ seek(); delay(10); parse(); } }

    void halt() { //Halt tag rfid.print(255, BYTE); rfid.print(0, BYTE); rfid.print(1, BYTE); rfid.print(147, BYTE); rfid.print(148, BYTE); }

    void parse() { while(rfid.available()){ if(rfid.read() == 255){ for(int i=1;i

No public wish lists :(