Arduino Code:
  1.  
  2. #include "Wire.h"
  3. #include "Adafruit_BMP085.h"
  4. Adafruit_BMP085 bmp;
  5. void setup() {
  6. Serial.begin(9600);
  7. bmp.begin();
  8. }
  9. void loop() {
  10. Serial.print("Temperature = ");
  11. Serial.print(bmp.readTemperature());
  12. Serial.println(" *C");
  13. Serial.print("Pressure = ");
  14. int pascal = bmp.readPressure();
  15. Serial.print(pascal);
  16. Serial.println(" Pa");
  17. // Calculate altitude assuming 'standard' barometric
  18. // pressure of 1013.25 millibar = 101325 Pascal
  19. Serial.print("Altitude = ");
  20. Serial.print(bmp.readAltitude());
  21. Serial.println(" meters");
  22. Serial.println();
  23. delay(500);
  24. }
  25.     
  26.  
  27.