PlatformIO and Arduino IDE aren’t 100% compatible, but as the example project shows, it doesn’t take much to make it work.
Basically, it’s a matter of:
- Creating your project (or open an existing one) - when you do this, you’ll realise where the
test and other bits come from).
- Renaming the
src directory to
something, and renaming
something is some pertinent name for your project. This meets the Arduino IDE requirement that the
.ino must has the same name as the folder containing it.
- Editing the
platformio.ini file, and adding the following to it (substituting
something for the name you used previously):
src_dir = something
- That’s pretty much it… if it compiles in PlatformIO, it should compile under the Arduino IDE, assuming you have all the necessary libraries that your project needs installed. All the #includes, function prototypes etc, will be understood by the Arduino IDE because that’s what it’s pre-processor does behind the scenes anyway.