From fb82598a5573ee178eee90870aaa09aecdc3d8be Mon Sep 17 00:00:00 2001 From: Brad Erickson Date: Mon, 15 Jan 2018 18:17:51 -0800 Subject: [PATCH] chore: Convert to PlatformIO project --- .gitignore | 6 +++++ lib/readme.txt | 36 +++++++++++++++++++++++++ platformio.ini | 17 ++++++++++++ PFOC-Belt.ino => src/PFOC-LED-Belts.ino | 0 beltConfig.h => src/beltConfig.h | 0 commands.h => src/commands.h | 0 6 files changed, 59 insertions(+) create mode 100644 .gitignore create mode 100644 lib/readme.txt create mode 100644 platformio.ini rename PFOC-Belt.ino => src/PFOC-LED-Belts.ino (100%) rename beltConfig.h => src/beltConfig.h (100%) rename commands.h => src/commands.h (100%) diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..dde4954 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +.pioenvs +.piolibdeps +.vscode +.vscode/c_cpp_properties.json +.vscode/launch.json +src/.vscode \ No newline at end of file diff --git a/lib/readme.txt b/lib/readme.txt new file mode 100644 index 0000000..dbadc3d --- /dev/null +++ b/lib/readme.txt @@ -0,0 +1,36 @@ + +This directory is intended for the project specific (private) libraries. +PlatformIO will compile them to static libraries and link to executable file. + +The source code of each library should be placed in separate directory, like +"lib/private_lib/[here are source files]". + +For example, see how can be organized `Foo` and `Bar` libraries: + +|--lib +| |--Bar +| | |--docs +| | |--examples +| | |--src +| | |- Bar.c +| | |- Bar.h +| |--Foo +| | |- Foo.c +| | |- Foo.h +| |- readme.txt --> THIS FILE +|- platformio.ini +|--src + |- main.c + +Then in `src/main.c` you should use: + +#include +#include + +// rest H/C/CPP code + +PlatformIO will find your libraries automatically, configure preprocessor's +include paths and build them. + +More information about PlatformIO Library Dependency Finder +- http://docs.platformio.org/page/librarymanager/ldf.html diff --git a/platformio.ini b/platformio.ini new file mode 100644 index 0000000..8e3c1c4 --- /dev/null +++ b/platformio.ini @@ -0,0 +1,17 @@ +; PlatformIO Project Configuration File +; +; Build options: build flags, source filter +; Upload options: custom upload port, speed and extra flags +; Library options: dependencies, extra library storages +; Advanced options: extra scripting +; +; Please visit documentation for the other options and examples +; http://docs.platformio.org/page/projectconf.html + +[env:feather32u4] +platform = atmelavr +board = feather32u4 +framework = arduino +lib_deps = + Adafruit BluefruitLE nRF51 + FastLED \ No newline at end of file diff --git a/PFOC-Belt.ino b/src/PFOC-LED-Belts.ino similarity index 100% rename from PFOC-Belt.ino rename to src/PFOC-LED-Belts.ino diff --git a/beltConfig.h b/src/beltConfig.h similarity index 100% rename from beltConfig.h rename to src/beltConfig.h diff --git a/commands.h b/src/commands.h similarity index 100% rename from commands.h rename to src/commands.h