Using Breakout sensors with ESP8266

Hi, I have the Breakout Garden and a few sensors and have successfully used them with Python on a Pi, however, I now want to connect one directly to an ESP8266 acting as a web server so that I can read its measurements remotely. I understand the principle of setting up the ESP as a web server and have successfully used it with a DHT11 sensor but I can’t get my head round connecting a (for example) BMP280. I’ve installed the BMP280 Arduino libraries but I can’t get the ESP to recognise the presence of the sensor. I can’t find ay tutorials that quite fit the bill - any advice please…?


This is possibly a little dated but fits the bill

1 Like

Also check this out, might help.

1 Like

In the words of Paul Daniels - “Now that’s Magic!” I had to modify the address in the Adafruit_BMP280.h file as it assumes 0x77 is default, otherwise works a treat!

Thanks for this - I’d previously successfully created a DHT11-based server using a NodeMCU ESP8266, curiously, it would only boot correctly if I removed the power from the DHT11 and then once the server was up, reconnecting the power line…

I meant to mention you may have to do that, but got sidetracked when I posted. Glad you sorted it out. Adafruit seem to be more Arduino / micro controller oriented. While Pimoroni is more Raspberry Pi orientated. Not a complaint just an observation. ;) Both sites have their merits. =)

1 Like

Absolutely :-)

I confused myself because there was a blob of solder on the back of the sensor - so I thought I’d previously changed from the default address,when in fact I’d changed it, by breaking the link, and then I’d restored the default, by re-shorting the gap!

I need to learn more WRT I2C, for both Arduino and Pi…


Yeah, the Pimoroni BMP280 has the address jumper shorted by default. You cut it to switch addresses. And solder it if you change your mind latter on. ;) It is easy to lose track of what you did or didn’t do. Especially if you have more than one sensor.
The Adafruit one, as near as I can tell doesn’t have an address select jumper?
I assumed you had the Pimoroni breakout garden one.
The general rule for i2c is multiple devices are allowed, it is a shared bus. But no two devices can have the same address.

Then there is the issue of using one companies code on another companies equivalent device. They may use a different address as the chip on the breakout board has that option. It may be fixed or have an option to change it. Depends on who did that breakout etc.

Hi yes, I have 5 Pimoroni Breakout sensors.

I tried that url - - doesn’t seem to work…?



Link works for me? Even the one in your post.
By works I mean it opens up that web page.
Type i2c protocol into Google and it should be the first site in the list.

The Pimoroni ones have what i2c address they use on thier product page. Its usually written on the back of the breakout some place too. And most, if not all of them have an option to change it to at least one alternate address.
I’m no expert, but I do believe if you do have two with the same ID, its just those two that don’t work. Your code may crash anyway though with IO errors etc…

Yes, that link works for me now!