Specifications:
Supply voltage 1.62V - 3.6V.
I2C connection interface.
Accuracy up to 0.02hPa (17cm).
Range: 300hPa to 1100hPa (+ 9000m to -500m).
Wiring diagram
GND -> GND
VIN -> 3.3V
SDA -> A4
SCL -> A5
Sketch
#include
#include
BMP085 dps = BMP085 ();
long Temperature = 0, Pressure = 0;
void setup (void) {
Serial.begin (9600);
Wire.begin ();
delay (1000);
dps.init ();
}
void loop (void) {
dps.getPressure (& Pressure);
dps.getTemperature (& Temperature);
Serial.print ("Pressure (mm Hg):");
Serial.print (Pressure / 133.3); // Print the pressure in mmHg
Serial.print ("Temp:");
Serial.println (Temperature * 0.1); // Temperature in degrees Celsius
delay (2000);
}
Cost: ~ 24