In this video lesson we explain how to use the BMP180 to measure barometric pressure and temperature. We explain basic concepts of what pressure is, and we show how the BMP180 measures pressure. The circuit schematic we use is shown here:

For your convenience, this is the code we developed in the video for measuring Temperature and Barometric Pressure.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
// ==================================================================== // DISCLAIMER: // This code is provided as-is for educational and experimental // purposes only. The author makes no representations or warranties of // any kind concerning the safety, suitability, or accuracy of this // code. Use at your own risk. The author assumes no liability for any // damages, system failures, security breaches, or network issues // resulting from the use or implementation of this script. // ==================================================================== #include <Adafruit_BMP085.h> Adafruit_BMP085 BP; float Pressure; float tempC; bool BMPconnected; void setup() { Serial.begin(9600); BMPconnected = BP.begin(); if (BMPconnected == true) { Serial.println("BMP180 Found and Connected."); } if (BMPconnected == false) { Serial.println("BMP180 Not Found. Check Connections"); } } void loop() { tempC = BP.readTemperature(); Pressure = BP.readPressure(); Serial.println("READINGS ------------"); Serial.print("Temperature = "); Serial.print(BP.readTemperature()); Serial.println(" *C"); Serial.print("Pressure = "); Serial.print(Pressure); Serial.println(" Pascals"); Serial.println(""); delay(1000); } |



