# Negative BMP085 temperature or half pressure?

If you’re experiencing getting negative temperature values (and it’s not that cold) from Bosch BMP085 pressure sensor or the pressure is about half of what it should be it because your sensor is defect. Return it wherever you bought it. I had three defect sensors in row, this is 100% tested and confirmed.

# Barometer units

1 atmosphere => 29.92 in Hg /760 mm Hg => 1.01325 bar => 1013.25 mb => 101.325 kPa => 1013.25 hPa

1 mb = 100 Pa = 0.1 kPa = 1 hPa = 0.0295 inches Hg = 0.75 mm Hg.

Source: http://www.islandnet.com/~see/weather/eyes/barometer2.htm

# What does “Barometric pressure inches” mean at Weather Undeground API and

Weather Undeground wants the pressure in their API (http://wiki.wunderground.com/index.php/PWS_-_Upload_Protocol) as “barometric pressure inches” which is the same as “inches of mercur” or inHg or just hg. Notice that it changes based on temperature.

Millibars aka hPa (the one’s around 1000) can be converted to Hg by multiplying with 0.02953 when tempeature is 32 fahrenheit (= 0 celcius, the water freezing point).

So: barometric pressure inches/inches of mercury/inHg = millibars/hPa * 0.02953

More here: http://www.csgnetwork.com/meteorologyconvtbl.html

# Bitwise rotate left (ROL) in Arduino

byte rol(byte b, byte amount)
{
amount = amount % 8;
uint8_t tmp = b;
tmp = (tmp >> (8-amount)) | (tmp << amount);
return tmp;
}