123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- #ifndef INCLUDE_CONFIGURATION_H_
- #define INCLUDE_CONFIGURATION_H_
- #include <user_config.h>
- #include <SmingCore/SmingCore.h>
- // If you want, you can define WiFi settings globally in Eclipse Environment Variables
- #ifndef WIFI_SSID
- #define WIFI_SSID "Heaven-WiFi" // Put you SSID and Password here
- #define WIFI_PWD "Heaven-32847"
- #endif
- // Pin for communication with DHT sensor
- #define DHT_PIN 2
- // Pin for trigger control output
- #define CONTROL_PIN 16
- #define METEO_CONFIG_FILE ".meteo.conf" // leading point for security reasons :)
- enum TriggerType
- {
- eTT_None = 0,
- eTT_Temperature,
- eTT_Humidity
- };
- struct MeteoConfig
- {
- MeteoConfig()
- {
- AddT = 0;
- AddRH = 0;
- AddTZ = 2;
- Trigger = eTT_Humidity;
- RangeMin = 30;
- RangeMax = 50;
- }
- String NetworkSSID;
- String NetworkPassword;
- float AddT; // Temperature adjustment
- float AddRH; // Humidity adjustment
- float AddTZ; // TimeZone - local time offset
- TriggerType Trigger; // Sensor trigger type
- float RangeMin;
- float RangeMax;
- };
- MeteoConfig loadConfig();
- void saveConfig(MeteoConfig& cfg);
- extern MeteoConfig ActiveConfig;
- #endif /* INCLUDE_CONFIGURATION_H_ */
|