weatherstation/firmware/config.h

52 lines
1.4 KiB
C

#ifndef __CONFIG_H__
#define __CONFIG_H__
// config general setting and behavior of the weatherstation
#define WIFI_AUTOCONNECT_TIMEOUT_S 60
#define WIFI_CONFIG_PORTAL_TIMEOUT_S 120
#define UPDATE_SENSOR_INTERVAL_S 300
#define UPDATE_WEBSERVER_INTVERVAL_MS 500 // Values greater than 1000 will negative affect availability of the webinterface
#define DELAY_LOOP_MS 100
#define POWERSAVING_SLEEP_S 600
#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 WATCHDOG_TIMEOUT_MS 30000
#define WIFI_CHECK_INTERVAL_MS 120000
#define INFLUXDB_TIMEOUT_MS 1000
#define ENERGY_SAVING_ITERATIONS 30
#define WIFI_MINIMUM_SIGNAL_QUALITY 10 // percent
#define BAT_LOW_VOLTAGE 3.6
#define BAT_EMERGENCY_DEEPSLEEP_VOLTAGE 3.5
#define SEALEVELPRESSURE_HPA (1013.25)
#define STATUS_LED_PIN LED_BUILTIN
#define ANEMOMETER_PIN D7
#ifndef BAT_PINS_D34
#define BAT_CHARGED_PIN D6
#define BAT_CHARGING_PIN D5
#else
#define BAT_CHARGED_PIN D3
#define BAT_CHARGING_PIN D4
#endif
#define BME_SCK 13
#define BME_MISO 12
#define BME_MOSI 11
#define BME_CS 10
#define BME_ADDRESS 0x76
#define BMP_ADDRESS 0x76
#define SERIAL_BAUD_RATE 115200
#define WEB_UPDATER_HTTP_PORT 8080
#endif