Skip to content

[DOC] https://www.arduino.cc/en/Serial/IfSerial only mentions Leonardo #3786

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
q2dg opened this issue Sep 12, 2015 · 10 comments
Closed

[DOC] https://www.arduino.cc/en/Serial/IfSerial only mentions Leonardo #3786

q2dg opened this issue Sep 12, 2015 · 10 comments
Assignees
Labels
Component: Documentation Related to Arduino's documentation content
Milestone

Comments

@q2dg
Copy link

q2dg commented Sep 12, 2015

It should changed by "32U4-based boards or something like this.

Moreover...what about Zero or Due? The example piece...

 while (!Serial) {
     ; // wait for serial port to connect. Needed for Leonardo only
   }

...is needed for them too or not?? (in other words, they do auto-reset when Serial monitor is opened?). It isn't clear anywhere of documentation and maybe this page should be the right place to point it out.

@q2dg
Copy link
Author

q2dg commented Sep 12, 2015

Well...in https://www.arduino.cc/en/Main/ArduinoBoardZero there is a note saying: "In contrast to some Arduino boards (e.g. Uno), when you open the serial monitor and the board is connected through the Programming Port the board does not automatically reset." So I deduce with Zero it is necessary to write the piece while(!Serial) {;} ...using both (Programming and Native) USB ports??? It isn't clear.

In Due I suppose when using Programming USB Port with Serial Monitor board is reset because uses the same 16U2 chip than UNO, but when using Native USB Port it isn't...but it isn't clear, again.

@matthijskooijman
Copy link
Collaborator

Yup, the Zero and Due behave the same on the native USB port AFAIK, so that example would probably need to be updated to something more general (like "Needed for boards without auto-reset only").

@q2dg
Copy link
Author

q2dg commented Sep 12, 2015

So my question is: which boards haven't auto-reset? My guess is:

  • 32U4 based: Micro, Yún, LilypadUSB
  • Native USB Port in Due
  • Both USB Ports in Zero (as the note in its product's page says)

I think a paragraph like above (corrected if needed) should be added to https://www.arduino.cc/en/Serial/IfSerial

@agdl
Copy link
Member

agdl commented Sep 14, 2015

On the Zero no way to use while(!Serial) with the programming because the serial is always open and connected to the EDBG. The sentence has to be changed to needed for native USB boards only. I will make a PR for all the examples ASAP

@q2dg
Copy link
Author

q2dg commented Sep 21, 2015

So...I infer serial monitor doesn't autoreset the Zero neither using programming nor native usb port, does it? I haven't any to try it.

@cmaglie
Copy link
Member

cmaglie commented Sep 21, 2015

@q2dg
Yes, correct.

agdl added a commit to agdl/Arduino that referenced this issue Sep 21, 2015
According to arduino#3786 removed the reference to Leonjardo only in while(!Serial) of the examples.
Changed in in "wait for serial port to connect. Needed for native USB port only"
@agdl
Copy link
Member

agdl commented Sep 21, 2015

here the PR #3833

Talking with @cmaglie we chose the phrase:

wait for serial port to connect. Needed for native USB port only

agdl added a commit to agdl/Arduino that referenced this issue Sep 21, 2015
According to arduino#3786 removed the reference to Leonjardo only in while(!Serial) of the examples.
Changed in in "wait for serial port to connect. Needed for native USB port only"
agdl added a commit to agdl/Arduino that referenced this issue Sep 21, 2015
According to arduino#3786 removed the reference to Leonardo only in while(!Serial) of the examples.
Changed in in "wait for serial port to connect. Needed for native USB port only"
@q2dg
Copy link
Author

q2dg commented Sep 21, 2015

Well, I don't wanna bother you more than necessary, but I would specify I little more...something like this

"wait for serial port to connect. Needed for native USB port only (i.e: ATmega32U4-based boards' only port and Due's one)"

A newbie doesn't need to know what is a "native" USB port, don't you think?

@agdl
Copy link
Member

agdl commented Sep 22, 2015

It is too long as a comment, I think it's better to improve the online documentation. In this way if someone has doubts he can easily search for an aswer

@q2dg
Copy link
Author

q2dg commented Sep 22, 2015

Ok, so waiting for this improvement in online documentation, I close this issue, if you don't mind.
Thanks!!

@q2dg q2dg closed this as completed Sep 22, 2015
@agdl agdl added this to the Release 1.6.6 milestone Sep 22, 2015
@agdl agdl added the Component: Documentation Related to Arduino's documentation content label Sep 22, 2015
sandeepmistry pushed a commit to sandeepmistry/Arduino that referenced this issue Sep 29, 2015
According to arduino#3786 removed the reference to Leonardo only in while(!Serial) of the examples.
Changed in in "wait for serial port to connect. Needed for native USB port only"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Documentation Related to Arduino's documentation content
Projects
None yet
Development

No branches or pull requests

4 participants