Hello,
I am have a hard time trying to get the zigbee S2 to communicate through the Arduino board.
I have configured the xbee using X-CTU and they communicate through that software manually so I know they are transmitting and receiving. But when I load a script they do not work... I have tried different types of file types with no success.
1 Uno Board
1 Mega Board
2 Xbee Shields
2 Xbee S2
Receiving Code
/*
now try for all data types.
once you load, you check the serial monitor
then comment that data type and uncomment the next one.
*/
//char __data = ' ';
String __data;
//int __data;
//byte __data;
void setup() {
Serial.begin(9600);
Serial.begin(9600);
}
void loop() {
while (Serial.available() > 0) {
__data = Serial.readString();
// __data = Serial.read();
}
Serial.println(__data);
Sending Code
int TRIAL1 = 1548723;
char _data = 'A';
byte b = B10010;
String Trial2 = "hsfbuy45";
String Trial3 = String (TRIAL1);
void setup() {
Serial.begin(9600);
}
void loop() {
Serial.println(TRIAL1, DEC);
delay (1000);
Serial.println(_data);
delay (1000);
Serial.println(b);
delay (1000);
Serial.println(Trial2);
delay (1000);
Serial.println(Trial3);
delay (1000);
}
At the end of the day, I just want it to transmit data (sensors) from one Arduino and display it on the other Arduino. I just can't seem to get it to talk through the serial Monitor. Thanks for any help..