From 45fac78797f1707aa636b5c1ddf90e4ccdd306ac Mon Sep 17 00:00:00 2001 From: Mathieu Maret Date: Mon, 28 Mar 2016 23:28:33 +0200 Subject: [PATCH] bmp180 is on pins 12 14 --- WifiControlSensor/BMP180.h | 3 ++- WifiControlSensor/MQTT.ino | 2 +- WifiControlSensor/WifiControlSensor.ino | 4 +++- 3 files changed, 6 insertions(+), 3 deletions(-) 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