Issue with "Upload" and "Serial Monitor" command for reading strings:


Quick question for the board: Is there a way to read a string immediately clicking "Upload" or Serial Monitor" once?

Let's put it this way:

-I have code with servo with strings showing me what degree it's at.
-When I change the code, I have to click "upload" before clicking "Serial Monitor" to have the Arduino recognize the code has changed.
-Then I click "Serial Monitor," and the code runs again.

I don't want the code to run twice (clicking upload to recognize the changes, then clicking "Serial Monitor" to see the text), and it is inefficient to also have the servos make 2 go-arounds for every code change. Is there a way I can just click "Upload" or "Serial Monitor" and have it recognize changes in code while also showing changed text? Thanks.

After upload board is reset (it is mandatory), opening serial monitor resets board too. You may try to use another terminal program, eg. Termite (do not reset board)

Yes, that is the way it is. The hardware detects the "wiggling" of the USB simulated DTR. Annyoying. And plenty of requests one way or the other to "fix" this.

Workaround: You can add a capacitor on the reset line, then it will not reset. But then you have to manually reset with the button for the upload to work - just when it starts "Upload".

Never tried it myself. I just write the setup/software to avoid problems with frequent resets (if it is a problem)