0

I am new to Intel Galileo. I am trying simple things. How do I use serial TX(Digital pin 1) and serial RX(Digital pin 0) for communicating with other UART devices ? Which serial port is this UART ? I tried to connect it by configuring it as uart 0/1/2 but did not work.

void setup() {    
  Serial1.begin(9600);
}

void loop() {
  // put your main code here, to run repeatedly:
  Serial1.println("Hello Galileo");
  delay(300);
}
0andriy
  • 4,183
  • 1
  • 24
  • 37
sujan_014
  • 516
  • 2
  • 8
  • 22

2 Answers2

0

I have never used the Galileo but I was not aware that it had more than 1 serial port. So basing my thinking on the UNO as well as the MEGA, pin 0 and 1 should not be Serial1 but just Serial, meaning that if you connect the TX pin to the RX pin of another device and then, as you posted above, run your code with Serial.begin(9600); and Serial.println.... instead of Serial1.... it should work as far as I know... Also, I sometimes use Serial.Write but I am unsure of what the difference is. I normally would not answer a question I don't know the exact solution to but as there are no answers yet I thought I would give it a try.

  • and also, you would need to be running a loop on the receiving and to interpret the data received... while(Serial.available()){ etc... } – user5035404 Jun 22 '15 at 08:44
  • In Arduino Uno, pin 0 and 1 is RX0/TX0 but in Galileo, it must be different. I tried using Serial/ Serial1 and so on in Galileo but I could not get output from pin 1 TX when checking using oscilloscope. So while in my case, serial.begin worked in Uno, it did not work in Galileo.. – sujan_014 Jun 25 '15 at 08:48
0

I'm using a Gen2 and the latest build of Windows IoT (9600.16384.x86fre.winblue_rtm_iotbuild.150309-0310_galileo_v2). In that build, Serial is the correct object for COM1 on pins D0 and D1 and I've used it successfully.

Serial1 is supposed to be COM2 on D2 and D3, but I get an error when I try to open it. I'm still working on that.

Ron
  • 269
  • 1
  • 6