Hi friends,
I have uploaded the following program on a nano and get displayed on the display swipe the card.
at rxd, the tx connection of an rfid reader hangs.
tags are detected, at least lights up when the ardu a led but the display does not show the result.
is possibly in the program an obvious error?
greeting
#include <LiquidCrystal_I2C.h>
#include <Wire.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);
int count = 0;
char singleChar;
String readMsg;
void setup()
{
lcd.begin();
lcd.setCursor (0,0);
lcd.print("Rubinios Scanner");
lcd.setCursor(0,1);
lcd.print(" RFID Reader ");
delay (2000);
}
void loop()
{
if(readMsg ==0)
{
lcd.setCursor(0,0);
lcd.print(" Swipe the Card ");
lcd.setCursor(0,1);
lcd.print(" ");
}
while(Serial.available()>0)
{
lcd.setCursor(0,0);
lcd.print(" Card ID is ");
lcd.setCursor(0,1);
lcd.print(" ");
singleChar = Serial.read();
count++;
readMsg += singleChar;
if(count == 12)
{
lcd.setCursor(2,1);
lcd.print(readMsg);
break;
}
}
readMsg="";
delay(1000);
}