Hi,
I have got an XBee which sends sensor data endlessly to another XBee. It is the following two lines which are updated and send every 1000 msec:
97991
1070
...
Using an XBee mounted on an XBee Shield (Sparkfun WRL-09976) together with PuTTY to display the data works fine. The sensor data run endlessly over the screen.
However, I see the data only once when I use the Arduino Uno to display the data coming in over an XBee mounted on a XBee shield (DFRobot DFR0015):
97991
1070
setup
So it seems that the data from mySerial are only read once.
I got the follwoing coding:
#include <SoftwareSerial.h>
SoftwareSerial mySerial(2, 3); // RX, TX
void setup()
{
Serial.begin(9600);
Serial.println("setup");
mySerial.begin(9600);
}
void loop()
{
if (mySerial.available())
{
Serial.print((char)mySerial.read());
}
if (Serial.available())
{
mySerial.print((char)Serial.read());
}
delay(4100);
Serial.println("----");
}
Any ideas what my error is ?
Thanks
AgeBee