ElieNamias / xbee-arduino

Automatically exported from code.google.com/p/xbee-arduino
GNU General Public License v3.0
0 stars 0 forks source link

Some problem of remote ATcommand #26

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I am new to arduino and xbee, so hope some one can help me.
I try to use a Xbee(I will call it XbeeA) to control another Xbee(I will call 
it XbeeB)
XbeeA is on my arduino, XbeeB do not connect a arduino. I want to make the 
XbeeB's 'DO' set to HIGH. So my code like that:

#include <XBee.h>
XBee xbee = XBee();
// Set DIO0 (pin 20) to HIGH
uint8_t d0Cmd[] = { 'D', '0' };
uint8_t d0Value[] = { 0x5 };
// SH + SL of the XbeeB
XBeeAddress64 remoteAddress = XBeeAddress64(0x0013a200, 0x4086dd3e);
// Create a remote AT request with the IR command
RemoteAtCommandRequest remoteAtRequest = RemoteAtCommandRequest(remoteAddress, 
d0Cmd, d0Value, sizeof(d0Value));

void setup() { 
  xbee.begin(9600);
 //time to build the communication
 delay(20000);
}

void loop() {
  xbee.send(remoteAtRequest); 
    remoteAtRequest.clearCommandValue();

    while (1) {}; 
}

The problem is that the code do not work. I do not know why. Hope someone can 
hope me.

Original issue reported on code.google.com by fzkl...@gmail.com on 21 Mar 2012 at 8:16

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Sorry, I forget to set the AP=2.
Thanks for the xbee library!

Original comment by fzkl...@gmail.com on 22 Mar 2012 at 8:26

GoogleCodeExporter commented 9 years ago

Original comment by andrew.rapp@gmail.com on 2 Feb 2014 at 6:47