Visual Studio Code:1.56.2 PIO:Core 5.1.1 Home 3.3.4
I do not know the former versions.
All older projects based on Arduino Nano (nanoatmega328) can not be builded without error:
#include <Arduino.h> ^~~~~~~~~~~ compilation terminated. *** [.pio\build\nanoatmega328\src\CreateSound.cpp.o] Error 1 *** [.pio\build\nanoatmega328\src\DebugOutput.cpp.o] Error 1 src\GetCommand.cpp:1:10: fatal error: Arduino.h: No such file or directory
I created an empty project with PIO and compiled it.
I have also older project based on ESP12F and STM32 these projects can be compiled without any errors.
None of the solutions i found for this problem worked.
Back to the roots. rename *.cpp in *.ino. flatten the directory to one. Open Arduino ID start compilation and results in no errors. It worked.
But i am not happy with this solution. And i am also dissapointed from PIO (or the combination with Visual Studio Code).
Has anybody a solution?
What ist necesarry to preserve a project which can later be compiled the same way?
So far, my bitbucket projects based on git must be trash or i am a real PIO dummy.