Hello!
I'm having difficulty implementing a simple ECHO program using UNO Arduino and XBee Series 1 modules.
I want to build a system for data acquisition in a ZigBee network. So I'm starting with a program that sends a string from a PC to Arduino and should receive this echo, which is not occurring.
I have one USB serial adapter to connect a XBee module on the computer.
At the other end of the link, is the Arduino, on which I have inserted a ProtoShield with the XBee module mounted on an adapter (in inches pin to pin in mm). The XBee module is powered by 3.3 V. As the Arduino board works with 5V and the XBee module with 3.3 V, I had to make a voltage divider to transform the voltage of 5V TX sent by the Arduino to a voltage of 3.3 V, consistent with the XBee. I connected the Arduino board RX pin directly to the XBee TX Module.
I did a test of "loop back" with a jumper that exists on the adapter and could replicate the characters typed into the PC away. So I think there is no matching problem between the modules. The PC module will act as Coordinator of the network and the remote will read any analog or digital signal and send the result to the PC for display and processing.
For the connection of the modules, I created a sketch from a sample of the Arduino IDE (SoftwareSerialExample) with a serial port on pins 2 and 3. I left the Arduino powered from the USB port and activated the Serial Monitor to observe the communication.
The program starts and sends a greeting message to the Serial Monitor (Goodnight Moon). From the PC side, any typed word reaches the Serial Monitor, but is not replicated by the serial to the PC.
I can’t find what is going on! Maybe de divider is not the ideal solution although I could read 3.2V on the RX pin of XBEE module.
I appreciate any help.
Zeppel