Go Down

Topic: Arduino Zero and the serial monitor (Read 6020 times) previous topic - next topic

_Mark_H

Apr 20, 2015, 12:52 am Last Edit: Apr 20, 2015, 12:57 am by _Mark_H
Hello together,

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.

Code: [Select]
// 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);
 
}


Thanks for your ideas

Mark

westfw

Doesn't Zero have two USB ports?  Perhaps "Serial" points at the other one...

_Mark_H

Hello westfw,

you are right. The Zero has two. One for is programming and one is the native. But it doesn't matter which one I use without the define.

Thanks

Mark

Robin2

Zero is still marked "coming soon" on the products page

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

PaulS

Quote
I actually thought the IDE would bend the access to the serial port.
Why would you think that? Whatever that means...
The art of getting good answers lies in asking good questions.

_Mark_H

Zero is still marked "coming soon" on the products page

...R
I think the product pages needs to be updated. In Germany you can get it since friday from tinkersoup. I did get it on saturday.

Mark

_Mark_H

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?

Mark

janwillemsmeenk

You best use SerialUSB which is connected to actually both USB ports of the Zero.

Serial is mapped to pin 0 an 1


Jan Willem

PS we are launching a Zero compatible board on Kickstarter next week.
If you can please support our pre-Kickstarter on Thunderclap.  

https://www.thunderclap.it/projects/26721-sodaq-goes-kickstarter

timarm

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

T

timarm

Forgot to mention that I don't include that #define to output to the Serial Monitor.

T

Go Up