diff --git a/WifiControlSensor/config.h b/WifiControlSensor/config.h index 32fb544..335be64 100644 --- a/WifiControlSensor/config.h +++ b/WifiControlSensor/config.h @@ -13,15 +13,16 @@ #define CONFIG_SAMPLING_PERIODE_MS 60000 #endif -#ifndef CONFIG_BMP180_SDA -#define CONFIG_BMP180_SDA 12 -#endif -#ifndef CONFIG_BMP180_SLC -#define CONFIG_BMP180_SLC 14 +#if defined(CONFIG_ENABLE_BMP180) && !defined(CONFIG_BMP180_SDA) +#error "When enabling BMP180, you should configure SDA pin" #endif -#ifndef CONFIG_DHT_PIN -#define CONFIG_DHT_PIN 2 +#if defined(CONFIG_ENABLE_BMP180) && !defined(CONFIG_BMP180_SCL) +#error "When enabling BMP180, you should configure SLC pin" +#endif + +#if defined(CONFIG_ENABLE_DHT) && !defined(CONFIG_DHT_PIN) +#error "When enabling DHT, you should configure SDA pin" #endif #ifndef CONFIG_SSID_NAME @@ -29,7 +30,7 @@ #endif #ifndef CONFIG_MQTT_CONTROLLED_GPIO -#define CONFIG_MQTT_CONTROLLED_GPIO {2, 13} +#define CONFIG_MQTT_CONTROLLED_GPIO {} #endif #ifndef CONFIG_EEPROM_SIZE diff --git a/WifiControlSensor/config_device.h b/WifiControlSensor/config_device.h index 9e4b47e..bd31558 100644 --- a/WifiControlSensor/config_device.h +++ b/WifiControlSensor/config_device.h @@ -13,7 +13,7 @@ #define CONFIG_BMP180_SCL 14 #define CONFIG_ENABLE_DHT -#define CONFIG_DHT_PIN 2 +#define CONFIG_DHT_PIN 5 // Enable light sleep to save some power (http://bbs.espressif.com/viewtopic.php?f=6&t=133&p=485&hilit=sleep+modem#p485) // Switch off internal LED @@ -38,7 +38,7 @@ // GPIO that can be set or get by mqtt // Should have less value than MAXSUBSCRIPTIONS -//#define CONFIG_MQTT_CONTROLLED_GPIO {2, 13} +#define CONFIG_MQTT_CONTROLLED_GPIO {2,13} // EEPROM SIZE