Skip to content

Instantly share code, notes, and snippets.

@elktros
Created March 29, 2021 10:29
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
ESP32 BM180 Sensor with Serial Output.
#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