Other people on the forums seem to have had success with using Serial1 on Gen 1 Galileo. I'm not able to use Serial1 for some reason. Any ideas?
I'm trying to use Digital Pins 0 and 1 as serial port. From what I've read, it should be available through Serial1 object.
I've jumpered D0 and D1.
My simple test sketch is below. When I run it and use Arduino 1.5.3's serial monitor, "Serial1 not available" keeps printing since line 14 fails. If I comment out lines 14, 24-26, Line 23 prints -1.
If I use Serial2 instead of Serial1, the serial port (3.5mm jack) shows a seg fault:
[ 446.519427] sketch.elf[1401]: segfault at d65903ac ip 08049412 sp b6590390 error 5 in sketch.elf[8048000+6000]
int i = 0; char incomingByte; void setup() { Serial1.begin(9600); } void loop() { delay(1000); i++; if (Serial1.available() > 0) { Serial1.println(i, DEC); Serial.print("Wrote: "); Serial.println(i, DEC); // read the incoming byte: incomingByte = Serial2.read(); // say what you got: Serial.print("I received: "); Serial.println(incomingByte, DEC); } else { Serial.println("Serial1 not available"); } }