diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0ee0d1c --- /dev/null +++ b/.gitignore @@ -0,0 +1,14 @@ +.pio + +# old platformio +.pioenvs +.piolibdeps +.clang_complete +.gcc-flags.json + +# virtualenv +bin/ +include/ +lib/ +local/ +share/ diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..71a1420 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,19 @@ +image: python:2.7 + +stages: + - build + +before_script: + - pip install -U platformio + - platformio update + +job: + stage: build + script: + - platformio ci --project-conf platformio.ini --board=lolin_d32_pro + - cp /home/user/.platformio/packages/framework-arduinoespressif32/tools/sdk/bin/bootloader.bin .pioenvs/lolin_d32_pro/ + - cp /home/user/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin .pioenvs/lolin_d32_pro/ + variables: {PLATFORMIO_CI_SRC: "src"} + artifacts: + paths: + - ".pioenvs/lolin_d32_pro/*.bin" diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..481aba5 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,20 @@ +Copyright (c) 2019 Hendrik Langer + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md index ac365a7..dba5656 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,33 @@ # esp32-weatherstation -Wetterstation v2 \ No newline at end of file +Wetterstation v2 with ESP32 and various sensors + +## Hardware +* ESP32 µC + +## Wiring +tbd + +## Build & Install + +```bash +git clone https://dev.xd0.de/hendrik/esp32-weatherstation.git +cd esp32-weatherstation +virtualenv . +source bin/activate +pip install -U platformio +platformio run -t upload && platformio device monitor -b 115200 +pio run +``` + +## Authors + +* **Hendrik** - *Initial work* - [hendrik](https://dev.xd0.de/hendrik) + +## License + +This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details + +## Acknowledgments + +* [PlatformIO](https://platformio.org) - Cross-platform IDE diff --git a/platformio.ini b/platformio.ini new file mode 100644 index 0000000..a68e92c --- /dev/null +++ b/platformio.ini @@ -0,0 +1,16 @@ +;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 +; https://docs.platformio.org/page/projectconf.html + +[env:lolin_d32_pro] +platform = espressif32 +framework = arduino +board = lolin_d32_pro + +monitor_speed = 115200 diff --git a/src/main.cpp b/src/main.cpp new file mode 100644 index 0000000..1b1c30f --- /dev/null +++ b/src/main.cpp @@ -0,0 +1,28 @@ +/* + * Blink + * Turns on an LED on for one second, + * then off for one second, repeatedly. + */ + +#include + +// Set LED_BUILTIN if it is not defined by Arduino framework +// #define LED_BUILTIN 2 + +void setup() +{ + // initialize LED digital pin as an output. + pinMode(LED_BUILTIN, OUTPUT); +} + +void loop() +{ + // turn the LED on (HIGH is the voltage level) + digitalWrite(LED_BUILTIN, HIGH); + // wait for a second + delay(1000); + // turn the LED off by making the voltage LOW + digitalWrite(LED_BUILTIN, LOW); + // wait for a second + delay(1000); +} diff --git a/test/README b/test/README new file mode 100644 index 0000000..df5066e --- /dev/null +++ b/test/README @@ -0,0 +1,11 @@ + +This directory is intended for PIO Unit Testing and project tests. + +Unit Testing is a software testing method by which individual units of +source code, sets of one or more MCU program modules together with associated +control data, usage procedures, and operating procedures, are tested to +determine whether they are fit for use. Unit testing finds problems early +in the development cycle. + +More information about PIO Unit Testing: +- https://docs.platformio.org/page/plus/unit-testing.html