Go Down

Topic: Arduino Due, Zigbee and Rx  (Read 712 times) previous topic - next topic

pepib

Dec 08, 2015, 10:44 pm Last Edit: Dec 08, 2015, 10:49 pm by pepib
Hi after many days of googling I write here for ask your help.
I have two Zigbee configured as API mode: Router and Coordinator.
The first one connected at laptop throught XCTU where I see the logs about RX/TX.
The second one connect on Arduino Due with a shield (as shown in photo http://imgur.com/j8ElgDV).
I'm using the library xbee-arduino. When I send a simple payload such as "'H' 'e' 'l' 'l' 'o' " from Coordinator to Router all works fine. I see on log in ASCII display "Hello".

But when I want send an AT command from Router to Coordinator, on Arduino I don't receive nothing.

Analyzing the code, I seen that I can readPacket but I think the getResponse().isAvailable() and getResponse().isError() are both false.

Where I wrong?

P.S. The scripts used are on github for Xbee Series 2:  https://github.com/andrewrapp/xbee-arduino/…/master/examples

PaulS

Quote
But when I want send an AT command from Router to Coordinator, on Arduino I don't receive nothing.
Why would you be sending AT commands when in API mode? Why are you using API mode?
The art of getting good answers lies in asking good questions.

pepib

Ok I'm using these xbee for command an RC car, let's assume that I want receive a payload with all data yelded by sensors and I want send a command to go on or turn left. How I can do this?

PaulS

Quote
I want send a command to go on or turn left.
Which AT command do you think the XBee understands that will make it make a motor connected a shield connected to some other device turn left?

The art of getting good answers lies in asking good questions.

pepib

for example I want send a command such "F" go on, "B" go backward, "L" turn left how I can do this in API mode?

Go Up