Problem Uploading To Arduino Uno

I’m having a problem with uploading my code to the board, i bought a kit from an Australian Electronics shop and they gave me this code and arduino uno.

Heres the code

// Example sketch to read the ID from an Addicore 13.56MHz RFID tag
// as found in the RFID AddiKit found at:
// http://www.addicore.com/RFID-AddiKit-with-RC522-MIFARE-Module-RFID-Cards-p/126.htm

#include <AddicoreRFID.h>
#include <SPI.h>

#define uchar unsigned char
#define uint unsigned int

uchar fifobytes;
uchar fifoValue;

AddicoreRFID myRFID; // create AddicoreRFID object to control the RFID module

/////////////////////////////////////////////////////////////////////
//set the pins
/////////////////////////////////////////////////////////////////////
const int chipSelectPin = 10;
const int NRSTPD = 5;

//Maximum length of the array
#define MAX_LEN 16

void setup() {
Serial.begin(9600); // RFID reader SOUT pin connected to Serial RX pin at 9600bps

// start the SPI library:
SPI.begin();

pinMode(chipSelectPin, OUTPUT); // Set digital pin 10 as OUTPUT to connect it to the RFID /ENABLE pin
digitalWrite(chipSelectPin, LOW); // Activate the RFID reader
pinMode(NRSTPD, OUTPUT); // Set digital pin 10 , Not Reset and Power-down
digitalWrite(NRSTPD, HIGH);

myRFID.AddicoreRFID_Init();
}

void loop()
{
uchar i, tmp, checksum1;
uchar status;
uchar str[MAX_LEN];
uchar RC_size;
uchar blockAddr; //Selection operation block address 0 to 63
String mynum = “”;

str[1] = 0x4400;
//Find tags, return tag type
status = myRFID.AddicoreRFID_Request(PICC_REQIDL, str);
if (status == MI_OK)
{
Serial.println(“RFID tag detected”);
Serial.print(“Tag Type:\t\t”);
uint tagType = str[0] << 8;
tagType = tagType + str[1];
switch (tagType) {
case 0x4400:
Serial.println(“Mifare UltraLight”);
break;
case 0x400:
Serial.println(“Mifare One (S50)”);
break;
case 0x200:
Serial.println(“Mifare One (S70)”);
break;
case 0x800:
Serial.println(“Mifare Pro (X)”);
break;
case 0x4403:
Serial.println(“Mifare DESFire”);
break;
default:
Serial.println(“Unknown”);
break;
}
}

//Anti-collision, return tag serial number 4 bytes
status = myRFID.AddicoreRFID_Anticoll(str);
if (status == MI_OK)
{
checksum1 = str[0] ^ str[1] ^ str[2] ^ str[3];
Serial.print(“The tag’s number is:\t”);
Serial.print(str[0]);
Serial.print(" , “);
Serial.print(str[1]);
Serial.print(” , “);
Serial.print(str[2]);
Serial.print(” , ");
Serial.println(str[3]);

Serial.print(“Read Checksum:\t\t”);
Serial.println(str[4]);
Serial.print(“Calculated Checksum:\t”);
Serial.println(checksum1);

// Should really check all pairs, but for now we’ll just use the first
if (str[0] == 197) //You can change this to the first byte of your tag by finding the card’s ID through the Serial Monitor
{
Serial.println("\nHello Craig!\n");
} else if (str[0] == 244) { //You can change this to the first byte of your tag by finding the card’s ID through the Serial Monitor
Serial.println("\nHello Erin!\n");
}
Serial.println();
delay(1000);
}

myRFID.AddicoreRFID_Halt(); //Command tag into hibernation

}

It’s an RFID code

Please help, Thank you

So.. What's the error? And please put your code inside [code]you code goes here[/code] tags next time..

Sorry, new to arduino

It just says "Exit Status 1" With all personal stuff where it saves above it.

In arduino settings, please enable verbose output for compilation and upload.

I’ve done that and it still comes up with
“Exit status 1”

Please do this:

  • When you encounter an error, you’ll see a button on the right side of the orange bar “Copy error messages” in the Arduino IDE (or the icon that looks like two pieces of paper at the top right corner of the black console window in the Arduino Web Editor). Click that button…
  • In a forum reply here, click on the reply field.
  • Click the </> button on the forum toolbar. This will add the forum’s code tags markup to your reply.
  • Press “Ctrl + V”. This will paste the error between the code tags.
  • Move the cursor outside of the code tags before you add any additional text to your reply.

If the text exceeds the forum’s 9000 character limit, save it to a .txt file and post it as an attachment. If you click the “Reply” button here, you will see an “Attachments and other settings” link.

Heres the code, Sorry if i did it wrong

Code.txt (10.1 KB)

I am no expert with making libraries, but this line is where the error is located:

C:\Users\jay-c\OneDrive\Documents\Arduino\libraries\AddicoreRFID/AddicoreRFID.h:199:14: error: flexible array member 'AddicoreRFID::serNum' not at end of 'class AddicoreRFID'

  byte serNum[];

If I am reading this correctly, the library AddicoreRFID is referring to a value called serNum, which doesn't exist in the library. Do you have the latest version? Where did you get it?

I have used the Mifare MFRC522 RFID hardware in a game. I used the Arduino RFID library at GitHub - miguelbalboa/rfid: Arduino RFID Library for MFRC522

I got it from an Australian Electronic Shop, They said to go to their website and copy the code

To put your code in a code box, use the </> icon in the far left of the post tool bar and paste your code between the two bracket sets that appear.

To go back and put your code in a code box, in the bottom right of your post, select “more” and click modify. When the modify post opens, high light your code and click the </> in the far left of the post tool bar. This will put you code in code brackets. Then save the changes.

It seems the folks at Addicore don't bother to do the most minimal testing of the code they provide to support their products. Sad. Worse, the code that breaks the library is pointless. Well, the good news is that means a very easy fix:

Open C:\Users\jay-c\OneDrive\Documents\Arduino\libraries\AddicoreRFID/AddicoreRFID.h in a text editor.

Delete line 199:

	byte serNum[];

Save the file.