From d51df5dd64b835443d93f408e8d3902f03343259 Mon Sep 17 00:00:00 2001 From: Mathieu Maret Date: Fri, 25 Mar 2016 00:06:33 +0100 Subject: [PATCH] Add first draft for pressure calulation a see level --- WifiControlSensor/BMP180.ino | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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;