Problem. Can’t find Arduino.h
I’ve looked at several places on the internet to try and resolve this issue.
‘’'***********************************************
This is the error.
Starting build…
“C:\msys64\mingw64\bin\g++.exe” -fdiagnostics-color=always -g “C:\Users\jake\Documents\PlatformIO\Projects\Blink2_ESP32\src\main.cpp” -o “C:\Users\jake\Documents\PlatformIO\Projects\Blink2_ESP32\src\main.exe”
C:\Users\jake\Documents\PlatformIO\Projects\Blink2_ESP32\src\main.cpp:1:10: fatal error: Arduino.h: No such file or directory
1 | #include <Arduino.h>
| ^~~~~~~~~~~
compilation terminated.
Build finished with error(s).
- The terminal process failed to launch (exit code: -1).
- Terminal will be reused by tasks, press any key to close it.
‘’'***********************************************
The code, only 3 lines.
#include <Arduino.h> ==> there is a red squiggly line under this
void setup(){}
void loop(){}
‘’'***********************************************
The platformio.ini.
[env:esp32dev]
platform = espressif32
board = esp32dev
framework = arduino
monitor_speed = 115200
upload_port = COM3
‘’‘***********************************************
‘’’***********************************************
Here’s what I’ve done.
- Removed this folder: C:\Users\jake.platformio\
- The file is on my local drive,ie, not in the cloud.
- The file path doesn’t have long names.
- Looked around trying to disable intellisense but couldn’t determine how to do.
- Verified the location of Arduino.h at:
C:\Users\jake.platformio\packages\framework-arduinoespressif32\cores\esp32
After deleting .platformio (#1 above) I did a rebuild and several of the folders were not there.
I suspect that’s because the build failed.
After each of the numbered items above I closed VSCode and reopenned. Also did several restarts.
To compile I’m using Terminal > Run Build Task. Have also used the arrow on the right upper corner.