Hi there
I have a question if you kindly can answer me.
my situation is:
if I have an Arduino and 3 XBee(s), one XBee connect to the Arduino as
a base, one of them connect to LDR to get analogue signal from the
LDR, and the last one connect to LED.
I want to get information from the LDR to be processed by the Arduino
and control the LED I want to connect LDR to the Arduino,
and Arduino to the LED via XBee.
Do I need change the setting of Xbees, I setted them as the following
for the base (PAN ID=1234, DH=0, DL=FFFF, MY=0, Coordinator Enable=1 )
and for ather two Xbee(PAN ID=1234, DH=0, DL=0, MY=1 and 2, Coordinator Enable=0)
I have problem to write the code, if any one can help me to write the code in "C" Language (for sending and receiving the data )
Thank you very much
I am waiting to hearing from you
if I have an Arduino and 3 XBee(s), one XBee connect to the Arduino as
a base, one of them connect to LDR to get analogue signal from the
LDR, and the last one connect to LED.
I want to get information from the LDR to be processed by the Arduino
and control the LED I want to connect LDR to the Arduino,
and Arduino to the LED via XBee.
A picture is worth 1000 words.
The XBees are NOT connected directly to the Arduino. The pin spacing doesn't even match. What is in between the Arduino and the XBee?
The XBees replace wires. The code is EXACTLY the same using XBees as using wires.
I connected TX of the base XBee to RX of Arduino and Rx to Tx
the problem I do not know that should I connect LDR and LED to Tx and Rx of the XBee(s) or to another pin
the code I have written to use without XBee is:
int LDR =0;
int LED = 9;
void setup()
{
analogReference (DEFAULT); // not need
pinMode(LED, OUTPUT); // make pin9 as output