Guest User

Untitled

a guest
May 23rd, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. #include <Wire.h>
  2. #include <Adafruit_BMP085.h>
  3.  
  4. Adafruit_BMP085 bmp;
  5.  
  6. void setup()
  7. {
  8. Serial.begin(9600);
  9. //Wire.begin (4, 5);
  10. if (!bmp.begin())
  11. {
  12. Serial.println("Could not find BMP180 or BMP085 sensor at 0x77");
  13. while (1) {}
  14. }
  15. }
  16.  
  17. void loop()
  18. {
  19. Serial.print("Temperature = ");
  20. Serial.print(bmp.readTemperature());
  21. Serial.println(" Celsius");
  22.  
  23. Serial.print("Pressure = ");
  24. Serial.print(bmp.readPressure());
  25. Serial.println(" Pascal");
  26.  
  27.  
  28. Serial.println();
  29. delay(5000);
  30. }
Add Comment
Please, Sign In to add comment