diff --git a/WifiControlSensor/BMP180.ino b/WifiControlSensor/BMP180.ino index 03634e3..cc7c008 100644 --- a/WifiControlSensor/BMP180.ino +++ b/WifiControlSensor/BMP180.ino @@ -1,3 +1,6 @@ +// Get Current altitude with http://fr.mygeoposition.com/ +#define ALTITUDE 130 + SFE_BMP180 bmp180; int bmp180Connected = 0; @@ -32,8 +35,10 @@ int BMP180GetTempAndPressure(double &t, double &p) { { delay(status); status = bmp180.getPressure(p, t); - if (status != 0) + if (status != 0){ + p = bmp180.sealevel(p, ALTITUDE); return 0; + } } } return -1;