Strange crashes + Wifly shield + RFID reader

cybergeek11:

code[0]='0'; code[1]='0'; code[2]='0'; code[3]='0'; code[4]='0'; code[5]='0'; code[6]='0'; code[7]='0'; code[8]='0'; code[9]='0';

Try change that part of code for this:

for (i=0; i<10; i++) 
{
   code[i] = '\0';          
}

It's will clear the array properly! Let us know about the result!