mirror of
https://github.com/schinken/esp8266-geigercounter.git
synced 2024-11-13 04:24:21 +01:00
Add update interval
This commit is contained in:
parent
4507b073f9
commit
01128be2c7
2 changed files with 7 additions and 2 deletions
|
@ -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() {
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue