PlatformIO Community

Have 2 questions, New to Platform IO and Arduino

I am new to PlatformIO and Im hoping someone can help me with 2 issues Im having.

In both cases I am using the VSCode plugin.

  1. Under windows I cannot get the Serial monitor to work, I get no data when I click on the icon for it. Even though using the same code generates output under the official IDE. Any ideas on how I could troubleshoot this?

  2. I was also trying to use the VSCode plugin under Linux and the “Arduino.h” file was not found. Can anyone tell me how I can go about setting up the path properly under Linux? I installed the official Arduino IDE under Linux. I even tried manually coping the .h file needed to the same dir as my main.cpp file without luck. Can anyone give me some insight on how to set this up properly?

Thanks in advance!!

Regarding question 2:

VSCode does not require the Arduino IDE to be installed. It will automatically download its own copy and only use this copy. You don’t need to configure any path.

The error related to “Arduino.h” not found can occur in two different contexts:

  1. Building your code using the PlatformIO Build command, either from the status bar or the side pane: The error is shown in the build log.
  2. Intellisense code completion and error-checking (diagnostics): The error is shown in the editor.

Always try to build your code first. If it fails, you can post platformio.ini and the full build log here.

If it builds successfully but still displays the error in the editor, close all open files, restart Visual Studio Code and then open the file again.