🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    M5cam and BMP180

    FAQS
    2
    4
    9.8k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      sheepDog
      last edited by

      Hello,
      I can read the pressure from BMP180 on a M5Stack and with Arduino.

      I can compile the M5cam software, but if I compile with esp-idf a BMP180 example I got a problem.

      I use this sample: https://github.com/krzychb/esp32-everest-run

      I can compile it and M5cam logged on my wifi. Then it read
      W (2116) Altimeter: Weather data retrieval initialized
      ... -> OK
      For the BMP180 I got this error:
      E (9184) BMP180: Sensor not found at 0x77
      E (9189) Altimeter: BMP180 init failed with error = 196610

      Is this a problem with the IO's?
      I used sample used sensor pins sda/scl: 0x19/0x1b
      Is this correct?

      1 Reply Last reply Reply Quote 0
      • W
        wschnell
        last edited by

        This post is deleted!
        1 Reply Last reply Reply Quote 0
        • S
          sheepDog
          last edited by sheepDog

          Here is am small test program that worked with M5Stack-hardware. With M5cam-hardware it didn't work.

          #include <Wire.h>
          #include <Adafruit_BMP085.h>
          Adafruit_BMP085 bmp;
          
          void setup() {
            Serial.begin(115200);
            //Wire.begin();       //Default
            Wire.begin(25,23);  //M5cam SDA, SCL
            //Wire.begin(21,22);  //M5Stack SDA, SCL
          
            Serial.println("\nStart program");
            if (!bmp.begin()) {
               Serial.println("Could not find a valid BMP085 sensor, check wiring!");
          	  while (1) {
                       Serial.println("Could not find a BMP085 sensor!");
          	     delay(2000);
          	  }
             }
          }
            
          void loop() {
              Serial.print("Temperature = ");
              Serial.print(bmp.readTemperature());
              Serial.println(" *C");    
             //...
              delay(500);
          }
          
          1 Reply Last reply Reply Quote 0
          • S
            sheepDog
            last edited by

            The answer is:

                conf.sda_io_num = 13;
                conf.scl_io_num = 4;
            
            1 Reply Last reply Reply Quote 0
            • First post
              Last post