diff --git a/WifiControlSensor/BMP180.h b/WifiControlSensor/BMP180.h index 4dd0561..98261c7 100644 --- a/WifiControlSensor/BMP180.h +++ b/WifiControlSensor/BMP180.h @@ -9,12 +9,12 @@ int bmp180Connected = 0; int BMP180GetTemperature(double &t); int BMP180GetTempAndPressure(double &t, double &p); -int BMP180Setup(); +int BMP180Setup(int sda, int scl); bool BMP180IsConnected(); #else //ENABLE_BMP80 int BMP180GetTemperature(double &t){return 0;}; int BMP180GetTempAndPressure(double &t, double &p){return 0;}; -int BMP180Setup(){return 0;}; +int BMP180Setup(int , int ){return 0;}; bool BMP180IsConnected(){return 0;}; #endif diff --git a/WifiControlSensor/BMP180.ino b/WifiControlSensor/BMP180.ino index 7c68804..6320224 100644 --- a/WifiControlSensor/BMP180.ino +++ b/WifiControlSensor/BMP180.ino @@ -1,7 +1,7 @@ #ifdef ENABLE_BMP180 #include "BMP180.h" -int BMP180Setup() { - bmp180Connected = bmp180.begin(SDA, SCL); +int BMP180Setup(int sda, int scl) { + bmp180Connected = bmp180.begin(sda, scl); return bmp180Connected; } diff --git a/WifiControlSensor/WifiControlSensor.ino b/WifiControlSensor/WifiControlSensor.ino index 99d5e98..dbb2d18 100644 --- a/WifiControlSensor/WifiControlSensor.ino +++ b/WifiControlSensor/WifiControlSensor.ino @@ -197,7 +197,7 @@ void setup() { if (mode == BOOTMODE_OTA) { OTASetup(); } else { - if (BMP180Setup()) + if (BMP180Setup(SDA, SCL)) SKETCH_DEBUG_PRINTLN("BMP180 init success"); WebSetupServer(mode); }