if (Serial.available() > 0)
{
for(int x = 0; x<2;x++)
{
message1
- = Serial.read();
Serial.available()>0 checks for the arrival of single character, say for example you need four character input change the condition as
if (Serial.available() > 3)
{
for(int x = 0; x<4;x++)
{
message1
- = Serial.read();
hope this helps!
Cheers,
bala
Tenet Techentronics
http://tenettech.com
