Page 1 of 1

ESP-01 + BMP280

PostPosted: Sat May 09, 2020 10:18 am
by yukardo
Hello everybody,

I am making a project using a BMP280 sensor connect to an ESP-01 board.

I am using I2C communication.

But it does not work. I think ESP-01 is not booting. I made a test with a LED and it did not execute loop code.

I use the following code:

Code: Select all#include <Wire.h>
//#include <SPI.h>
#include <Adafruit_BMP280.h>

#define BMP_SCK  (13)
#define BMP_MISO (12)
#define BMP_MOSI (11)
#define BMP_CS   (10)

Adafruit_BMP280 bmp; // I2C
//Adafruit_BMP280 bmp(BMP_CS); // hardware SPI
//Adafruit_BMP280 bmp(BMP_CS, BMP_MOSI, BMP_MISO,  BMP_SCK);

void setup() {
  Serial.println(F("BMP280 test"));

  if (!bmp.begin()) {
    Serial.println(F("Could not find a valid BMP280 sensor, check wiring!"));
    while (1);

  /* Default settings from datasheet. */
  bmp.setSampling(Adafruit_BMP280::MODE_NORMAL,     /* Operating Mode. */
                  Adafruit_BMP280::SAMPLING_X2,     /* Temp. oversampling */
                  Adafruit_BMP280::SAMPLING_X16,    /* Pressure oversampling */
                  Adafruit_BMP280::FILTER_X16,      /* Filtering. */
                  Adafruit_BMP280::STANDBY_MS_500); /* Standby time. */

  pinMode(1, OUTPUT);

  Wire.begin(2, 0);


void loop() {

    digitalWrite(1, HIGH);
    Serial.print(F("Temperature = "));
    Serial.println(" *C");

    Serial.print(F("Pressure = "));
    Serial.println(" Pa");

    Serial.print(F("Approx altitude = "));
    Serial.print(bmp.readAltitude(1013.25)); /* Adjusted to local forecast! */
    Serial.println(" m");


    digitalWrite(1, LOW);

This is the diagram. LED connected to GPIO1 does not appear in the diagram.


I hope you can help me.


Re: ESP-01 + BMP280

PostPosted: Fri Sep 10, 2021 2:31 am
by Vossing
I want to make this too, have you found a solution ?
By the way the wiring picture is missing.

If you have manage to get this to work, would you like to share it!

Re: ESP-01 + BMP280

PostPosted: Sat Sep 11, 2021 3:31 am
by schufti
it is bme280 but you will get the idea...