Add update interval

This commit is contained in:
schinken 2015-12-23 23:18:40 +01:00
parent 4507b073f9
commit 01128be2c7
2 changed files with 7 additions and 2 deletions

View file

@ -39,7 +39,7 @@ void setup() {
Serial.println("IP address: ");
Serial.println(WiFi.localIP());
timer.setInterval(300000, updateRadiationValues);
timer.setInterval(UPDATE_INTERVAL_SECONDS * 1000L, updateRadiationValues);
}
void updateRadiationValues() {

View file

@ -8,11 +8,16 @@
#define RECV_LINE_SIZE 37
#define PIN_UART_RX 2 // 4
#define PIN_UART_RX 0 // 4
#define PIN_UART_TX 13 // UNUSED
#define UPDATE_INTERVAL_SECONDS 300L
#define BAUD_GEIGERCOUNTER 9600
//const char* ssid = "yourSSID";
//const char* password = "----";
#define MQTT_TOPIC_CPM "sensor/radiation/cpm"
#define MQTT_TOPIC_USV "sensor/radiation/uSv"
#define MQTT_TOPIC_LAST_WILL "state/sensor/geigercounter"