weatherstation/firmware/config.h

47 lines
1.3 KiB
C
Raw Normal View History

#ifndef __CONFIG_H__
#define __CONFIG_H__
#define SENSOR_TEMPERATURE 0
#define SENSOR_HUMIDITY 1
#define SENSOR_LIGHT 2
#define SENSOR_WINDSPEED 3
2017-11-20 20:42:02 +01:00
#define SENSOR_PRESSURE 4
2018-07-11 11:12:53 +02:00
#define SENSOR_BAT_VOLTAGE 5
2019-02-02 10:09:00 +01:00
#define SENSOR_ESAVEMODE 6
#define SENSOR_BATCHARGESTATE 7
#define BAT_CHARGE_STATE_CHARGED 2.0
#define BAT_CHARGE_STATE_CHARGING 1.0
#define BAT_CHARGE_STATE_NOTCHARGING 0.0
2019-02-02 14:01:13 +01:00
#define ENERGY_SAVE_MODE_ENABLED 1.0
#define ENERGY_SAVE_MODE_DISABLED 0.0
2017-11-07 22:20:14 +01:00
2019-02-02 13:31:21 +01:00
#define WIFI_AUTOCONNECT_TIMEOUT_S 120
#define WIFI_CONFIG_PORTAL_TIMEOUT_S 120
2019-02-02 11:15:27 +01:00
#define UPDATE_SENSOR_INTERVAL_S 10
#define UPDATE_WEBSERVER_INTVERVAL_S 1
#define DELAY_LOOP_MS 50
#define POWERSAVING_SLEEP_S 600
2018-12-02 17:06:06 +01:00
#define EMERGENCY_SLEEP_S 172800 // Sleep for 2 days to recover
2019-02-02 11:15:27 +01:00
#define ENERGY_SAVING_ITERATIONS 30
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
2019-02-02 11:15:27 +01:00
#define BAT_CHARGED_PIN D6
#define BAT_CHARGING_PIN D5
#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
2019-01-08 22:41:24 +01:00
#define INITIAL_WEBSERVER_TIME 20
2019-02-09 09:52:49 +01:00
#endif