i'm using RC522 RFID library with UTFT library in arduino mega 2560..
what i want is to print read value from RFID card on TFT as hex..
in my code it gives garbage characters on display..
please help!! :o
void setup()
{
pinMode(13, OUTPUT);
digitalWrite(13, LOW);
// Initial setup
myGLCD.InitLCD();
myGLCD.clrScr();
myTouch.InitTouch();
myTouch.setPrecision(PREC_HI);
myGLCD.setFont(BigFont);
myGLCD.setBackColor(0, 0, 255);
Serial.begin(9600); // Initialize serial communications with the PC
SPI.begin(); // Init SPI bus
RC522.init();
}
void loop()
{
/* Temporary loop counter */
byte i;
/* Has a card been detected? */
if (RC522.isCard())
{
/* If so then get its serial number */
RC522.readCardSerial();
/* Output the serial number to the UART */
for(i = 0; i <= 4; i++)
{
myGLCD.setColor(255, 255, 255);
myGLCD.print((char*)RC522.serNum[i], 350, 20);
}
}