diff --git a/examples/BarometricPressureWebServer/BarometricPressureWebServer.ino b/examples/BarometricPressureWebServer/BarometricPressureWebServer.ino index af097db..c5df7ab 100644 --- a/examples/BarometricPressureWebServer/BarometricPressureWebServer.ino +++ b/examples/BarometricPressureWebServer/BarometricPressureWebServer.ino @@ -141,7 +141,7 @@ void getData() { //Read the pressure data lower 16 bits: unsigned int pressureDataLow = readRegister(0x20, 2); //combine the two parts into one 19-bit number: - pressure = ((pressureDataHigh << 16) | pressureDataLow) / 4; + pressure = (((long) pressureDataHigh << 16) | pressureDataLow) / 4; Serial.print("Temperature: "); Serial.print(temperature);