M5cam and BMP180
-
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 = 196610Is this a problem with the IO's?
I used sample used sensor pins sda/scl: 0x19/0x1b
Is this correct? -
This post is deleted! -
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); }
-
The answer is:
conf.sda_io_num = 13; conf.scl_io_num = 4;