sir i tried tht it works when i send data via serial monitor
but when this transmitted via xbee 16703301 it displaying serial data as 16703301 and showing enter no
RFID Reader sends 16703301 this data via xbee
if i connect receiver xbee to pc and opened RS232 analyzer in tht it displays 16703301 this data correctly.
BUT in aurdino
#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
String readString;
void setup() {
Serial.begin(9600);
lcd.begin(16, 2);
}
void loop() {
//expect a string like wer,qwe rty,123 456,hyre kjhg,
//or like hello world,who are you?,bye!,
lcd.setCursor(0, 1);
while (Serial.available()) {
delay(10); //small delay to allow input buffer to fill
char c = Serial.read(); //gets one byte from serial buffer
if (c == ',') {break;} //breaks out of capture loop to print readstring
readString += c; } //makes the string readString
if (readString.length() >0) {
Serial.println(readString); //prints string to serial port out
if(readString =="16703301<CR><LF>")
{
Serial.print("hello");
lcd.print("hello");
}
else if(readString == 16705890)
{
Serial.print("HI");
lcd.print("hi");
}
else
{
Serial.print("enterno");
lcd.print("enter no");
}
readString=""; //clears variable for new input
}
}
Moderator edit: CODE TAGS again.
and showing this no only 16703301
wht can i do pls help me sir