Community
cancel
Showing results for 
Search instead for 
Did you mean: 
JJuli7
Beginner
914 Views

Serial communication between Arduino Uno and Galileo Gen2

I have a Arduino Uno connected to https://www.amazon.com/Shield-Touch-Display-Module-Arduino/dp/B00Q6WN3PU this TFT display and I'm trying to send text data from Galileo's serial port to Arduino's serial port.

Pins 10 and 11 of Galileo are connected to pins RX, TX of Arduino.

This is the sketch that is running on theArduino Uno:

 

 

# include // Core graphics library

 

# include // Hardware-specific library

 

 

//Definicao de cores

 

# define BLACK 0x0000

 

# define BLUE 0x001F

 

# define RED 0xF800

 

# define GREEN 0x07E0

 

# define CYAN 0x07FF

 

# define MAGENTA 0xF81F

 

# define YELLOW 0xFFE0

 

# define WHITE 0xFFFF

 

 

//CS, CD, WR, RD, RESET

 

Adafruit_TFTLCD tft(A3, A2, A1, A0, A4);

 

 

void setup(void)

 

{

 

Serial.begin(9600);

 

tft.reset();

 

delay(500);

 

tft.begin(0x9341);

 

 

tft.fillScreen(WHITE);

 

tft.setTextColor(BLACK);

 

tft.setTextSize(3);

 

tft.setCursor(0, 20);

 

 

}

 

 

void loop()

 

{

 

 

tft.fillScreen(BLACK);

 

tft.setTextColor(WHITE);

 

tft.setTextSize(3);

 

tft.setCursor(0, 20);

 

tft.println(Serial.readString());

 

delay(1000);

 

 

}

 

 

}

 

 

 

If I use the Serial Monitor to send data, this works just fine, but I want it to print whatever data the Galileo is sending.

And this is the one running on the Galileo Gen2:

void setup() {

 

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

 

Serial.begin(9600);

 

 

}

 

 

void loop() {

 

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

 

Serial.write("Testing...");

 

}

When I open the Serial Monitor it shows just fine the "Testing..." string, but Arduino never receives it.

0 Kudos
5 Replies
idata
Community Manager
41 Views

Hi,

 

 

Are you sure you have all the connections properly wired? When communicating through serial the usual connection would be the Tx pin of the Galileo to the Rx of the Arduino; and the Tx of the Arduino to the Rx of the Galileo. Make sure you're not connecting Tx with Tx and Rx with Rx. Are you using common GND on your configuration?

 

 

Can you test with an oscilloscope that the Galileo is in fact sending the proper signals?

 

 

-Sergio

 

JJuli7
Beginner
41 Views

Sergio, I checked and the wiring is indeed correct. Tx and Rx of Galileo and Arduino are connected and I'm using a common GND. I'll try to check with an oscilloscope if the Galileo is sending the proper signals. Thank you for your reply!

FTinetti
Honored Contributor I
41 Views

Hi JuliaFC,

Just in case you missed my previous reply:

JuliaFC wrote:

Sergio, I checked and the wiring is indeed correct. Tx and Rx of Galileo and Arduino are connected and I'm using a common GND. I'll try to check with an oscilloscope if the Galileo is sending the proper signals. Thank you for your reply!

If you connect Arduino's Rx-Tx to Galileo's Tx-Rx you will not receive anything with

Serial.write("Testing...");

run in Gaileo. Try using

Serial1.write("Testing...");

HTH,

Fernando.

idata
Community Manager
41 Views

Do you still need help with this thread? What were the results of connecting as we suggested?

 

 

-Sergio

 

FTinetti
Honored Contributor I
41 Views

Hi JuliaFC,

JuliaFC wrote:

I have a Arduino Uno connected to https://www.amazon.com/Shield-Touch-Display-Module-Arduino/dp/B00Q6WN3PU this TFT display and I'm trying to send text data from Galileo's serial port to Arduino's serial port.

Pins 10 and 11 of Galileo are connected to pins RX, TX of Arduino.

Intel Galileo's pins 10 and 11 are not a serial port per se..., I think you can use them as a serial port, but via some library. Furthermore

JuliaFC wrote:

And this is the one running on the Galileo Gen2:

void setup() {

 

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

 

Serial.begin(9600);

 

 

}

 

 

void loop() {

 

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

 

Serial.write("Testing...");

 

}

When I open the Serial Monitor it shows just fine the "Testing..." string, but Arduino never receives it.

The Serial library does not use pins 10 & 11 (and I think the Serial library usage does not affect any pin at all... please check, I'm not 100% sure). Maybe you can try with Serial1 instead of Serial and using Intel Galileo pins 0 and 1 connected to Arduino's pins 1 and 0 respectively. I think you will have to use a common GND, as suggested in the previous reply.

HTH,

Fernando.

Reply