I am coding an RFID device, and I want the device ID recorded (char tagID) in a swipe to be stored in a separate place (char safeID).
I am using global variables for both. When I compile, I get the following error:
In function 'void loop()':
error: invalid array assignment At global scope:
The global declarations:
#define tagLength 10
char tagID[tagLength];
int tagIndex = 0;
int tagComplete =
false;//consistent values
char safeID[tagLength];
and this is where I set them equal in my loop structure:
void loop(){
while (locked == 0) // the loop to run while it waits for a bike
{
if (Serial.available() > 0)
{
readByte();
}
if(tagComplete == true)
{
//Serial.println(tagID); //Only used for PC Commlocked = 1; //set global locked var to 1
** safeID = tagID; //set the safeID to the current TagID**
LockThat();//lock the device
}
}
Wonder what I am doing wrong?
Thank you!
Steve