1

I am using an Arudino Nano with VS Code and PlatformIO. When developing. I want to streamline the process so that when I press 1 hotkey. It will automatically disconnect the Serial Monitor. Build. Upload. Then reconnect the Serial Monitor.

I can partially do it with the "Upload and Monitor" project task:

enter image description here

However, it connects to the serial via the Terminal which means I can't send commands like I do with the serial monitor:

enter image description here

If I connect the serial monitor manually. It does not automatically disconnect so that it can do the upload.

How can I set up vs code with platform io to build, upload, and reconnect the serial monitor with a single hotkey?

Edit: I managed to get the terminal to allow sending input by adding:

monitor_echo = on

monitor_filters = send_on_enter

To platformio.ini, but it messes up if you try to edit the message with backspace and it does not repeat the last message by pressing the up arrow key like the Serial Monitor tab does.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.