Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By torntrousers
#17867 I had a BMP180 arrive in the post today and have it working with an ESP-12.

The I2C pins are GPIO0 is SDA and GPIO2 is SCL.

So far i've just tried this library - https://github.com/sparkfun/BMP180_Breakout with the ESP8266 Arduino IDE, I had to modify that library, changing SFE_BMP180.cpp so instead of Wire.begin() it had Wire.begin(0,2). That is with the latest ESP8266 Arduino IDE code, with the original ESP8266 Arduino IDE 1.6.1 release code you'd have to add Wire.pins(0,2) before the Wire.begin(). But with that original IDE release a lot of these presure sensor libraries fail due to the math bug - https://github.com/esp8266/Arduino/issues/170 - so you'll probably have better luck with that latest code as described here: https://github.com/esp8266/Arduino#user ... ds-manager
User avatar
By dayzman
#17869
j0hncc wrote:
dayzman wrote:I'm trying to use this driver https://github.com/reaper7/esp8266_i2c_bmp180 but I can't quite tell which pins SCL and SDA should be connected to. Any idea?

Thanks


Looks to me like that library uses an underlying i2c_driver library that includes these defaults:

#define I2C_SDA_MUX PERIPHS_IO_MUX_GPIO2_U
#define I2C_SDA_FUNC FUNC_GPIO2
#define I2C_SDA_PIN 2

#define I2C_SCK_MUX PERIPHS_IO_MUX_MTMS_U
#define I2C_SCK_FUNC FUNC_GPIO14
#define I2C_SCK_PIN 14


Thanks! In the case of connecting several over I2C, how should the connection be split?
User avatar
By scargill
#19682 Well, I hooked up the BMP180 to the ESP8266 and took the standard example - using GPIO0 and GPIO2 - and it SAYS it works - but the results have me utterly floored.

Get temperature and pressure...
Temperature: 27.3 *C
Temperature: 81.1 *F
Pressure: 757 mm rt.st.
Pressure: 10 m water.st.
Pressure: 100963.63 mbar
Pressure: 757.2 mmHg
Altitude: 102807

Ok, so I get the temperature both in centigrade and Fahrenheit - looks about right to me - but the pressure.... I guess I'm expecting just above sea level for that to be 1000mb ??? Am I reading that result correctly - that I should be crushed to death here in my office - as for the altitude - I have no idea what that's supposed to mean.

Thoughts anyone? ESP8266 - 3v3 line to 3v3, "Vcc" disconnected... clock to GPIO0 on an ESP-01 with pullups...