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.
Category Archives: snippet
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;
}
Some info of AdrenaLinn
AdrenaLinn (first version) has PIC 16F877 inside, probably for the user interface? It also has all presets etc. stored on SST39VF020-90-4C-NH.
16 bit integer to two bytes
int a = 65535; // 16 bit integer
byte MSB = a/256;
byte LSB = a % 256;
.. and back:
byte MSB, LSB;
int a1 = ( MSB << 8 ) | LSB;