-
-
Notifications
You must be signed in to change notification settings - Fork 7k
[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
Comments
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. |
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"). |
So my question is: which boards haven't auto-reset? My guess is:
I think a paragraph like above (corrected if needed) should be added to https://www.arduino.cc/en/Serial/IfSerial |
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 |
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. |
@q2dg |
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"
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"
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"
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? |
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 |
Ok, so waiting for this improvement in online documentation, I close this issue, if you don't mind. |
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"
It should changed by "32U4-based boards or something like this.
Moreover...what about Zero or Due? The example piece...
...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.
The text was updated successfully, but these errors were encountered: