Community
cancel
Showing results for 
Search instead for 
Did you mean: 
NK
New Contributor I
869 Views

Intel Galieo Gen2 with XBee S2

Jump to solution

I am quite new to this board and I have been trying to communicate between two galileos using XBee s2's.

I am using arduino software for this purpose.

Initially I tried shorting the tx/rx(Serial1) of the gen 2 and tried sending text and simultaneously printing when received.But it started printing junk values like forever until I had to close the program itself.

below is the code

///

int readValue = 0;

void setup() {

// put your setup code here, to run once:

Serial.begin(9600);

Serial1.begin(9600);

}

void loop() {

// put your main code here, to run repeatedly:

Serial1.write("Hey how are you?");

delay(1000);

if (Serial1.available() > 0) {

int val = Serial1.read();

Serial.println(val);

}

}

///

I have a remote router API configured to the coordinator pan(connected to the gen 2).

Firstly, I had connected tx of module to rx of board, and similarly the rx of module to the tx of board.

Secondly, I had configured the router API to keep sending its ADC values.

Another observation was that , when the coordinator and router are connected to a usb and are observed using the XCTU software, I am perfectly receiving the sample values.

I tried using the XBee-Arduino-Master library, famous one for arduino, for receiving the values but again was unsuccessful.

I used the below code to print the values coming from the serial port.

//

void setup() {

// put your setup code here, to run once:

Serial.begin(9600);

Serial1.begin(9600);

Serial.println("Hello and welcome!!");

}

void loop() {

// put your main code here, to run repeatedly:

if(Serial1.available()){

Serial.println(Serial1.read(),HEX);

}

delay(500);

}

//

Any advice on how to proceed ?

1 Solution
Sergio_A_Intel
Employee
55 Views

Hi,

Have you read http://www.intel.com/content/www/us/en/support/boards-and-kits/000005913.html Intel® Galileo and Intel® Edison Board Shield Testing Report for...? Section 2 "XBee* S2 Module w/Arduino* Wireless Proto Shield". It contains a detailed explanation and code that has been tested with the Gen 2.

Review the document and let me know if you find useful information here.

Sergio

View solution in original post

1 Reply
Sergio_A_Intel
Employee
56 Views

Hi,

Have you read http://www.intel.com/content/www/us/en/support/boards-and-kits/000005913.html Intel® Galileo and Intel® Edison Board Shield Testing Report for...? Section 2 "XBee* S2 Module w/Arduino* Wireless Proto Shield". It contains a detailed explanation and code that has been tested with the Gen 2.

Review the document and let me know if you find useful information here.

Sergio

View solution in original post

Reply