Created
March 29, 2021 10:29
-
-
Save elktros/c938e84819f1d52c904098ee8c57c89e to your computer and use it in GitHub Desktop.
ESP32 BM180 Sensor with Serial Output.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Adafruit_BMP085.h> | |
Adafruit_BMP085 bmp;; | |
void setup() | |
{ | |
Serial.begin(115200); | |
if (!bmp.begin()) | |
{ | |
Serial.println("BMP180 Sensor not found ! ! !"); | |
while (1) | |
{ | |
} | |
} | |
} | |
void loop() | |
{ | |
Serial.print("Pressure = "); | |
Serial.print(bmp.readPressure()); | |
Serial.print(" hPa"); | |
Serial.print(" Temp = "); | |
Serial.print(bmp.readTemperature()); | |
Serial.println("ºC"); | |
delay(3000); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment