My hardware is
Sensor-->Arduino --> Xbee Xbee-->Arduino-->PC(Serial monitor)
An issue I'm having with the tutorial is that it uses an FTDI cable on the receving side. I want to connect the receiving Xbee to an Arduino. I know that I can connect the sensor directly to the ADC pins on the transmitting Xbee, but I want the Arduino also on the transmit side.
The code below basically serial prints "test" over and over.
I want that word to be seen in the serial monitor that is connected to the Arduino on the receiving side. I'm confused on what code to use here. This problem may seem trivial, but I'm really confused. Plus, the p-p tutorial talks about replicating what is being typed into the serial monitor. I don't need that capability. Any help would be appreciated.
I tried this code, but no success. I have the TX/RX pins of the Xbees connected to the TX/RX pins of the Arduino on either end.
Sketch in Transmit Arduino
Code: Select all
void setup() {
Serial.begin(9600);
}
void loop() {
char data = 'test';
Serial.print(data); //print value to xbee (serial port)
delay(100); // stop the program for some time
Code: Select all
void setup() {
Serial.begin (9600);
}
void loop() {
while(Serial.available())
{
char getData = Serial.read();
Serial.print (getData);
}
}