diff --git a/WifiControlSensor/BMP180.h b/WifiControlSensor/BMP180.h index 98261c7..3c01d56 100644 --- a/WifiControlSensor/BMP180.h +++ b/WifiControlSensor/BMP180.h @@ -1,6 +1,7 @@ #pragma once #ifdef ENABLE_BMP180 #include +#include "debug_sketch.h" // Get Current altitude with http://fr.mygeoposition.com/ #define ALTITUDE 130 @@ -15,6 +16,6 @@ bool BMP180IsConnected(); #else //ENABLE_BMP80 int BMP180GetTemperature(double &t){return 0;}; int BMP180GetTempAndPressure(double &t, double &p){return 0;}; -int BMP180Setup(int , int ){return 0;}; +int BMP180Setup(int , int ){SKETCH_DEBUG_PRINTLN("BMP180 is disabled at build time"); return 0;}; bool BMP180IsConnected(){return 0;}; #endif diff --git a/WifiControlSensor/MQTT.ino b/WifiControlSensor/MQTT.ino index e031434..d35a78a 100644 --- a/WifiControlSensor/MQTT.ino +++ b/WifiControlSensor/MQTT.ino @@ -14,7 +14,7 @@ char pressureFeed[FEED_MAX_SIZE] = {}; // Should have less that MAXSUBSCRIPTIONS elements // MAXSUBSCRIPTIONS is defined is Adafruit_mqtt.h -const int gpioWatched[] = {12, 13}; +const int gpioWatched[] = {2, 13}; #define GPIO_FEED_FORMAT "/feeds/%s/gpio/%d" #define GPIO_SET_FEED_FORMAT "/feeds/%s/gpio/%d/set" diff --git a/WifiControlSensor/WifiControlSensor.ino b/WifiControlSensor/WifiControlSensor.ino index aacdb52..5317345 100644 --- a/WifiControlSensor/WifiControlSensor.ino +++ b/WifiControlSensor/WifiControlSensor.ino @@ -21,6 +21,8 @@ #include #define ENABLE_BMP180 +#define SKETCH_DEBUG + #include "debug_sketch.h" #include "BMP180.h" @@ -36,7 +38,7 @@ char eeprom[EEPROM_SIZE]; #define SAMPLING_PERIODE_MS 60000 /* I2C pin used*/ -#define SDA 2 +#define SDA 12 #define SCL 14 #define BOOTMODE_SETUP 0