yesterday my new Arduino Zero has arrived. I wanted to do slowly my first steps with him. And right at the first "Hello world" I'm a little puzzled. I actually thought the IDE would bend the access to the serial port. But without the "define" line I see no output on the serial monitor, no matter whether I use the ptogramming or the native usb port on the Zero.
Is this a bug or do I not get it right?
Here is my simple sketch. Only the blinking example with serial monitor output.
// Define Serial for using the Arduino Zero's programming port
#define Serial Serial5
// the setup routine runs once when you press reset:
void setup() {
// initialize serial communication at 9600 bits per second:
Serial.begin(9600);
// initialize digital pin 13 as an output.
pinMode(13, OUTPUT);
}
// the loop routine runs over and over again forever:
void loop() {
digitalWrite(13, HIGH); // turn the LED on (HIGH is the voltage level)
Serial.println("HIGH"); // send the state to the serial monitor
delay(2000); // wait for two second
digitalWrite(13, LOW); // turn the LED off by making the voltage LOW
Serial.println("LOW");
delay(500);
}
PaulS:
Why would you think that? Whatever that means...
I think that because "Serial" does not change if I take a sketch for the Uno and compile it for the Mega. For the Zero it was announced that he is source compatible with Arduino. For me that includes also "Serial". Or do I think wrong?
I'm able to get data out on the serial monitor from the debug USB port. I made no modifications to the ArduinoZero. My computer doesn't (yet) recognize the ArduinoZero when I connect it via the other USB port. I'm using 9600 Baud.
I notice sometimes I get nothing on the serial monitor and the drop down menus (format and baud rate) on the bottom right side of the serial window are greyed out when this happens. I have to close it and open a new serial monitor window while the program is still running and it works again. Tools -> Serial Monitor