3

I'm using theVisual Studio Code extension to develop for Arduino which works great.

It doesn't have a Serial Plotter like the regular Arduino IDE, which I need to debug this project. I can run the Arduino IDE's Serial Plotter alongside Visual Studio Code without too much of a problem.

However, if I try to compile and upload from Visual Studio Code while the Arduino IDE is running, the port is busy (not a surprise):

avrdude: ser_open(): can't open device "/dev/cu.usbmodem14201": Resource busyAn error occurred while uploading the sketch

So I have to keep exiting and relaunching the Arduino IDE every time I build.

Anyone have a suggestion for how to work around this? Using an iMac as development environment.

askedNov 6, 2018 at 21:26
Joel Spolsky's user avatar
2
  • 1
    isn't it enough to close Serial Monitor window?CommentedNov 7, 2018 at 7:47
  • this does work, but is still kind of annoying... Thanks!CommentedNov 7, 2018 at 22:08

2 Answers2

3

Without very specialized software that can create two new devices with the correct "teeing" policy, it's not going to be possible. Only one program can open a serial port at a time (certainly and have it get anything intelligible out of it...)

I would suggest you may want to add a second serial port. Use an FT232 adaptor to communicate on another serial connection (or a SoftwareSerial connection at a pinch) for your debugging information. You really want a board with more than one serial port for this - or a board with a native USB for programming and a hardware serial port for data communication.

Another alternative is to ditch the serial for programming altogether and program your board through a dedicated programmer, thus leaving your serial port free for data communication.

answeredNov 6, 2018 at 22:46
Majenko's user avatar
-1

Try teleplot extension in vscode

answeredApr 19, 2023 at 23:44
Moose's user avatar
2
  • 1
    Your answer could be improved with additional supporting information. Pleaseedit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answersin the help center.CommentedApr 19, 2023 at 23:45
  • Please edit so you can expand on your answer. As it currently stands, you answer does not meet the quality standards for this site. EG. Add a link, provide a summary of teleplot, answer how this extension solves the problem the OP was having.CommentedApr 26, 2023 at 3:23

Your Answer

Sign up orlog in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

By clicking “Post Your Answer”, you agree to ourterms of service and acknowledge you have read ourprivacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.