34 lines
1.5 KiB
Markdown
Raw Permalink Normal View History

2019-04-25 17:12:58 +02:00
# Usage of the esp8266boilerplate project in your own Arduino ESP8266 projects
2019-04-25 17:08:06 +02:00
Wolfgang Hottgenroth <woho@hottis.de>
2019-04-25 16:59:34 +02:00
* Create an Arduino ESP8266 project in Sloeber
* Add esp8266boilerplate as submodule to your project:
2019-04-25 17:08:06 +02:00
2019-04-25 15:09:10 +00:00
```
2019-04-25 17:08:06 +02:00
git submodule init
git submodule add git@gitlab.com:wolutator/esp8266boilerplate.git
2019-04-25 15:09:10 +00:00
```
2019-04-25 17:08:06 +02:00
* Copy `ConfigGenerator/ConfigDataStructure.py-example` into your project directory,
rename it to `ConfigDataStructure.py`
* Edit `ConfigDataStructure.py` according to your requirements
2019-04-25 17:11:38 +02:00
* Change into directory ConfigGenerator and run `configGen.sh`,
2019-04-25 16:59:34 +02:00
it generates the configuration code for your projects into your
2019-04-25 17:11:38 +02:00
project directory (files `configuration.cpp` and `configuration.h`, do not edit
2019-04-25 16:59:34 +02:00
these files)
2019-04-25 17:11:38 +02:00
* Copy `defines.h-example` into your project directory, rename it to `defines.h` and edit it
2019-04-25 16:59:34 +02:00
according to your requirements
2019-04-25 17:08:06 +02:00
* In to main cpp file of your project you have the functions `setup()` and `loop()`.
Edit this file and call `mainSetup()` from the `setup()` function and `mainLoop()` from
the `loop()` function. Do not change anything else in this file.
* Add the directory `esp8266boilerplate` as an include and a source location in the
2019-04-25 16:59:34 +02:00
properties of your project.
* Create all the code you need for you application. Call your own main setup function
2019-04-25 17:08:06 +02:00
`setupApplication()` and your own main loop function `loopApplication()`. These functions
2019-04-25 16:59:34 +02:00
will be called via mainSetup and mainLoop when the system is running in production
(in contrast to configuration) mode.