weatherstation/firmware/config.h

56 lines
1.6 KiB
C
Raw Normal View History

#ifndef __CONFIG_H__
#define __CONFIG_H__
// config general setting and behavior of the weatherstation
2017-11-07 22:20:14 +01:00
#define VERSION_STRING "1.1.5"
#define WIFI_AUTOCONNECT_TIMEOUT_S 60
2022-09-14 20:40:08 +02:00
#define WIFI_CONFIG_PORTAL_TIMEOUT_S 120
#define UPDATE_SENSOR_INTERVAL_S 300
2022-09-15 13:14:58 +02:00
#define UPDATE_WEBSERVER_INTVERVAL_MS 500 // Values greater than 1000 will negative affect availability of the webinterface
#define DELAY_LOOP_MS 50
2019-02-02 11:15:27 +01:00
#define POWERSAVING_SLEEP_S 600
2018-12-02 17:06:06 +01:00
#define EMERGENCY_SLEEP_S 172800 // Sleep for 2 days to recover
#define RESET_ESP_TIME_INTERVAL_MS (60*60*12*1000) // reset every 12 hours
#define WIND_SENSOR_MEAS_TIME_S 15
#define WIND_SPEED_MEAS_NO_ISR_TIME_MS 50
#define WATCHDOG_TIMEOUT_MS WDTO_8S // Look at Esp.h for further possible time declarations
#define WIFI_CHECK_INTERVAL_MS 120000
#define INFLUXDB_TIMEOUT_MS 1000
#define WEB_LOGGER_UPDATE_S 5
2019-02-02 11:15:27 +01:00
#define ENERGY_SAVING_ITERATIONS 30
#define WIFI_MINIMUM_SIGNAL_QUALITY 10 // percent
2018-12-02 17:06:06 +01:00
#define BAT_LOW_VOLTAGE 3.6
#define BAT_EMERGENCY_DEEPSLEEP_VOLTAGE 3.5
2017-11-07 22:20:14 +01:00
2019-01-08 22:41:24 +01:00
#define SEALEVELPRESSURE_HPA (1013.25)
2019-02-03 19:10:38 +01:00
#define STATUS_LED_PIN LED_BUILTIN
#define ANEMOMETER_PIN D7
2020-02-20 19:49:44 +01:00
#ifndef BAT_PINS_D34
2019-02-02 11:15:27 +01:00
#define BAT_CHARGED_PIN D6
#define BAT_CHARGING_PIN D5
2020-02-20 19:49:44 +01:00
#else
#define BAT_CHARGED_PIN D3
#define BAT_CHARGING_PIN D4
#endif
#define BME_SCK 13
2017-12-09 18:08:37 +01:00
#define BME_MISO 12
#define BME_MOSI 11
#define BME_CS 10
2019-02-03 19:10:38 +01:00
#define BME_ADDRESS 0x76
2017-12-09 18:08:37 +01:00
#define BMP_ADDRESS 0x76
2022-09-14 11:54:59 +02:00
#define SERIAL_BAUD_RATE 115200
#define WEB_UPDATER_HTTP_PORT 8080
#endif