First get the two arduinos to communicate without the XBees by connecting the TX on one to the RX on the other (plus a ground). This eliminates all of the XBee issues while you straighten out the arduino code.
Once this is working then connect the XBees.
Also there have been many, many threads on this subject so search the forums.
thank you, yes i know, i’ve reading here also … and trying to find the correct tutorial.
So, you said that i should not to connect both of XBees… i was going to try to ignore the explorers regulate and follow the instruction from this book: Building Wireless Sensor Networks: With ZigBee, XBee, Arduino, and Processing
i attach a new picture with the correct connections. If i have only one common ground for both, should i only connect one of them to the USB? or both arduinos to the USB?
when int he code is:
analogWrite(13, int(recebe));
its because i’m trying to put a variable value do the PWM pin on the arduino. and recebe is a variable that i get form the serial connection.
Now connect in the XBees as in your first diagrams. Do not change any code in the Arduinos as you know this is working.
Use one of the XBee tutorials and set to addressing on the XBees to point at each other. Try it and you should get the same result as the test without the XBees.
There may be another issue that concerns the SparkFun Explorer boards circuit design. There have been a number of threads about this issue so search the forums for more.
This issue is due to the use of a series diode on the XBee’s DIN line to protect the XBee from the voltage levels of a processor running from 5V. The common fix that seems to work is removing the diode and inserting a pair of resistors in a “voltage divider” to get 3.3V from the 5V output of the Arduino’s TX pin.
Check this tutorial for a voltage divider and XBee parameter set-up: