BME280 in Blynk

Hi there, it´s me again :slight_smile:
I am playing with another sensor which I want to run on battery with deepsleep and show measurements in the Blynk mobile app.It´s BME280 sensor

I am able to see measured values in serial monitor of IDE (connected with ESP8266-12E for the beginning) but I am not able to implement Blynk code so I am not able to see it in my phone app. I understand it´s noob task, but really coding and me are not friends :frowning:

I tried to put my BME280 code into my existing code posted here https://community.blynk.cc/t/what-is-wrong-with-my-project-battery-not-lasting-as-long-as-expected/17716/40?u=helpfinder

but no success :frowning: maybe some of you can help me here? Thank in advance

This is my BME280 code wotking with serial monitor

/***************************************************************************
  This is a library for the BME280 humidity, temperature & pressure sensor
 
  Designed specifically to work with the Adafruit BME280 Breakout
  ----> http://www.adafruit.com/products/2650
 
  These sensors use I2C or SPI to communicate, 2 or 4 pins are required
  to interface. The device's I2C address is either 0x76 or 0x77.
 
  Adafruit invests time and resources providing this open source code,
  please support Adafruit andopen-source hardware by purchasing products
  from Adafruit!
 
  Written by Limor Fried & Kevin Townsend for Adafruit Industries.
  BSD license, all text above must be included in any redistribution
 ***************************************************************************/
 
 
// Sketch modified by Steve Spence - http://arduinotronics.blogspot.com
// converted to American units and added Dew Point and Heat Index calculations
 
 
#include <Wire.h>
#include <SPI.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_BME280.h>
 
#define BME_SCK 13
#define BME_MISO 12
#define BME_MOSI 11
#define BME_CS 10
 
//#define BME_SDA D3
//#define BME_SDL D4
 
#define SEALEVELPRESSURE_HPA (1013.25)
 
Adafruit_BME280 bme; // I2C
//Adafruit_BME280 bme(BME_CS); // hardware SPI
//Adafruit_BME280 bme(BME_CS, BME_MOSI, BME_MISO, BME_SCK); // software SPI
 
unsigned long delayTime;

void setup() {
    Serial.begin(9600);
    Serial.println(F("BME280 test"));

    bool status;
    
    // default settings
    status = bme.begin();
    if (!status) {
        Serial.println("Could not find a valid BME280 sensor, check wiring!");
        while (1);
    }
    
    Serial.println("-- Default Test --");
    delayTime = 1000;

    Serial.println();
}


void loop() { 
    printValues();
    delay(delayTime);
}


void printValues() {
    Serial.print("Temperature = ");
    Serial.print(bme.readTemperature());
    Serial.println(" *C");

    Serial.print("Pressure = ");

    Serial.print(bme.readPressure() / 100.0F);
    Serial.println(" hPa");

    Serial.print("Approx. Altitude = ");
    Serial.print(bme.readAltitude(SEALEVELPRESSURE_HPA));
    Serial.println(" m");

    Serial.print("Humidity = ");
    Serial.print(bme.readHumidity());
    Serial.println(" %");

    Serial.println();
}

My second question is related if somebody has experience with BME280 connected to the ESP8266-01 only with GPIO0 and GPIO2 (without need to solder small pins, to solder GPIO16 for deepsleep is enough I would say).

I will try to use ESP8266-07 which has more pins but I have to chedk if there is easy way to probram it without builting complex circuits with buttons etc.

Thank you