Comments on: ESP32 with BMP180 Barometric Sensor – Guide https://randomnerdtutorials.com/esp32-with-bmp180-barometric-sensor/ Learn ESP8266, ESP32, Arduino, and Raspberry Pi Sun, 31 Dec 2023 12:14:32 +0000 hourly 1 https://wordpress.org/?v=6.8.2 By: Curro https://randomnerdtutorials.com/esp32-with-bmp180-barometric-sensor/#comment-881142 Sun, 31 Dec 2023 12:14:32 +0000 http://randomnerdtutorials.com/?p=50474#comment-881142 Don’t forget to set the serial monitor to 9600 bauds, otherwise you´ll see nothing but squares.

]]>
By: Birol https://randomnerdtutorials.com/esp32-with-bmp180-barometric-sensor/#comment-800989 Sun, 04 Dec 2022 22:32:15 +0000 http://randomnerdtutorials.com/?p=50474#comment-800989 In reply to Sara Santos.

I tried and it worked. You are great.
Thank you very much

]]>
By: Sara Santos https://randomnerdtutorials.com/esp32-with-bmp180-barometric-sensor/#comment-800983 Sun, 04 Dec 2022 21:34:26 +0000 http://randomnerdtutorials.com/?p=50474#comment-800983 In reply to Birol.

Try it out and see if it works.

]]>
By: Birol https://randomnerdtutorials.com/esp32-with-bmp180-barometric-sensor/#comment-800930 Sun, 04 Dec 2022 14:08:02 +0000 http://randomnerdtutorials.com/?p=50474#comment-800930 In reply to Sara Santos.

Hello Sarah
Thank you for the excellent information you have provided. I hope I am not wrong. I made the changes you mentioned.
Thank you very much.

/*
Rui Santos
Complete project details at https://RandomNerdTutorials.com/esp32-i2c-communication-arduino-ide/

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files.

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
*/

#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_BMP085.h>

#define I2C_SDA 21 // first bmp180
#define I2C_SCL 22 // first bmp180

#define I2C_SDA_2 33 // 33 second bmp180
#define I2C_SCL_2 32 // 32 second bmp180

#define SEALEVELPRESSURE_HPA (1013.25)

TwoWire I2CBME = TwoWire(0); // first bmp180
Adafruit_BMP085 bme; // first bmp180

TwoWire I2CBME_2 = TwoWire(1); // TwoWire(1); // second bmp180
Adafruit_BMP085 bme_2; // second bmp180

unsigned long delayTime;

void setup() {
Serial.begin(115200);
Serial.println(F(“BMP085 test”));
I2CBME.begin(I2C_SDA, I2C_SCL, 100000);

Serial.println(F(“BMP085_2 test”));
I2CBME_2.begin(I2C_SDA_2, I2C_SCL_2, 200000); // , 200000);

bool status;

// default settings
// (you can also pass in a Wire library object like &Wire2)
status = bme.begin(0x77, &I2CBME);
if (!status) {
Serial.println(“Could not find a valid BMP085 sensor, check wiring!”);
while (1)
;
}

status = bme_2.begin(0x77, &I2CBME_2);
if (!status) {
Serial.println(“Could not find a valid BMP085_2 sensor, check wiring!”);
while (1)
;
}

Serial.println(“– Default Test –“);
delayTime = 1000;

Serial.println();
}

void loop() {
printValues();
delay(delayTime);
}

void printValues() {
Serial.print(“Temperature = “);
Serial.print(bme.readTemperature());
Serial.println(” *C”);

Serial.print(“Pressure = “);
Serial.print(bme.readPressure() / 100.0F);
Serial.println(” hPa”);

Serial.print(“Approx. Altitude = “);
Serial.print(bme.readAltitude(SEALEVELPRESSURE_HPA));
Serial.println(” m”);

Serial.print(“Temperature_2 = “);
Serial.print(bme_2.readTemperature());
Serial.println(” *C”);

Serial.print(“Pressure_2 = “);
Serial.print(bme_2.readPressure() / 100.0F);
Serial.println(” hPa”);

Serial.print(“Approx. Altitude_2 = “);
Serial.print(bme_2.readAltitude(SEALEVELPRESSURE_HPA));
Serial.println(” m”);

Serial.println();
}

]]>
By: Sara Santos https://randomnerdtutorials.com/esp32-with-bmp180-barometric-sensor/#comment-800895 Sun, 04 Dec 2022 10:49:40 +0000 http://randomnerdtutorials.com/?p=50474#comment-800895 In reply to Birol.

Yes.
Check this tutorial to learn how to use multiple I2C connections: https://randomnerdtutorials.com/esp32-i2c-communication-arduino-ide/
Regards,
Sara

]]>
By: Birol https://randomnerdtutorials.com/esp32-with-bmp180-barometric-sensor/#comment-800855 Sun, 04 Dec 2022 07:05:13 +0000 http://randomnerdtutorials.com/?p=50474#comment-800855 Hello
Can 2 sensors be connected to esp32?
Thank you.

]]>
By: neo_xnitro https://randomnerdtutorials.com/esp32-with-bmp180-barometric-sensor/#comment-788395 Tue, 04 Oct 2022 10:07:57 +0000 http://randomnerdtutorials.com/?p=50474#comment-788395 Alternatively, to know the hPa for your static location, you must do:

// 114 m is my location altitude
bmp.readSealevelPressure(114);

This return Pa of my location and divided by 100 give you hPa

]]>
By: Andres Pablo LOpez Barbero https://randomnerdtutorials.com/esp32-with-bmp180-barometric-sensor/#comment-756743 Fri, 10 Jun 2022 17:39:24 +0000 http://randomnerdtutorials.com/?p=50474#comment-756743 Hi everybody! THanks a lot for the comments and for sharing your knoledgment!. It’s great!!
I’m using a Esp32 Lora Wifi V2 and, the only way to run the BMP180 was using the old version (version 1.0.0) of the Adafruit_BMP085.h. I used exactly the code BMP085test above. THe last version of this library (1.2.1) run very nice in Arduino IDE but only when using, as hardware, an Arduino (I tested using Arduino UNO). But, when using the Esp32 Lora Wifi V2, the Adafruit_BMP085.h must be the version 1.0.0. I hope to help !

]]>
By: Umar Muhammad https://randomnerdtutorials.com/esp32-with-bmp180-barometric-sensor/#comment-416579 Sun, 22 Dec 2019 22:41:51 +0000 http://randomnerdtutorials.com/?p=50474#comment-416579 Hello Rui would this example work with esp8266?

]]>
By: Rui Santos https://randomnerdtutorials.com/esp32-with-bmp180-barometric-sensor/#comment-387006 Mon, 05 Aug 2019 09:47:43 +0000 http://randomnerdtutorials.com/?p=50474#comment-387006 In reply to Giuseppe Lo Cicero.

Thanks for the suggestion!

]]>