Browse Source

Convert arduino project into Platform IO project. I've had enough of the default IDE!

master
Starbeamrainbowlabs 4 years ago
parent
commit
4bf1548aad
4 changed files with 65 additions and 0 deletions
  1. +8
    -0
      .gitignore
  2. +2
    -0
      PixelHub-Client/PixelHub-Client.ino
  3. +36
    -0
      PixelHub-Client/lib/readme.txt
  4. +19
    -0
      PixelHub-Client/platformio.ini

+ 8
- 0
.gitignore View File

@ -5,6 +5,14 @@
# Created by https://www.gitignore.io/api/visualstudio
## Platform IDE
.pioenvs
.piolibdeps
.clang_complete
.gcc-flags.json
### VisualStudio ###
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.


+ 2
- 0
PixelHub-Client/PixelHub-Client.ino View File

@ -1,3 +1,5 @@
#include <Arduino.h>
/*
* Connecting to a WiFi network with WPA
************************************************


+ 36
- 0
PixelHub-Client/lib/readme.txt View File

@ -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 <Foo.h>
#include <Bar.h>
// 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

+ 19
- 0
PixelHub-Client/platformio.ini View File

@ -0,0 +1,19 @@
; 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:d1]
platform = espressif8266
board = d1
framework = arduino
[env:d1_mini]
platform = espressif8266
board = d1_mini
framework = arduino