From 17060ad77d8ae5f606cbd2f0bc473b1357feaf9c Mon Sep 17 00:00:00 2001 From: Holger Fleischmann Date: Fri, 13 Sep 2019 19:16:11 +0200 Subject: [PATCH] travis support --- .gitignore | 3 ++- README.md | 4 +++- src/credentials.cpp | 13 +++++++++++++ 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 src/credentials.cpp diff --git a/.gitignore b/.gitignore index f96e839..3c4b19a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ +.pio .pioenvs .piolibdeps .vscode -credentials.cpp +secret_* diff --git a/README.md b/README.md index dd48ca1..c3bfb78 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +[![Build Status](https://travis-ci.org/grillbaer/esp32-geiger-counter.svg?branch=master)](https://travis-ci.org/grillbaer/esp32-geiger-counter) + # IoT Geiger Counter with ESP32, OLED Display and Thingspeak Channel - Measures radioactive gamma and beta radiation with quite good resolution at the typical low levels of the natural radiation (due to the big STS-6 tube) @@ -26,4 +28,4 @@ Feel free to use this project as a base for your own projects AT YOUR OWN RISK! - [PlatformIO VSCode project](https://github.com/platformio/platformio-vscode-ide) using [Arduino](https://github.com/arduino/Arduino) library, [Espressif ESP-IDF](https://github.com/espressif/esp-idf) for sleep functions and [U8g2](https://github.com/olikraus/u8g2) for display output - Low-power mode uses light sleep, a wake-up for each signal pulse change and a wake-up every 1000 ms to update pulse statistics and OLED. This results in about 90% sleep. Could be improved using deep sleep and ULP. However, light sleep is already quite good and much easier. - WiFi mode uses no sleep and simple interrupts for pulse counting. Pulse statistics and OLED are updated every 1000 ms, data is sent to thingspeak every 60 s. -- Credentials (WiFi SSID, password, thingspeak channel key) are only declared in `credentials.h` and must be defined in a `credentials.cpp` +- Credentials (WiFi SSID, password, thingspeak channel key) are declared in `credentials.h` and defined with dummy values in `credentials.cpp`. Define them in a sibling file named `secret_credentials` (which is never committed) and uncomment its include in `credentials.cpp` diff --git a/src/credentials.cpp b/src/credentials.cpp new file mode 100644 index 0000000..c02b5de --- /dev/null +++ b/src/credentials.cpp @@ -0,0 +1,13 @@ +#include "credentials.h" + +// keep secret credentials in an external file that is never committed: +// #include "secret_credentials" + +#ifndef _SECRET_CREDENTIALS + +// use dummy credentials to make it compilable without secrets +const char *wifiSsid = "unset-wifi-ssid"; +const char *wifiPassword = "unset-password"; +const char *thingspeakApiKey = "unset-thinkspeak-api-key"; + +#endif