Hi everyone. Could somebody take a look at the problem below please?
After half a year of working fine, my BME280 (GYBMEP board, 5V, I2C, with 746 UP label on the sensor) connected to Arduino nano via i2c had stoppped working.
- the sensor is still detecting by default i2c_scanner on the 0x76 address.
- Adafruit_BME280 lib bme280 example (I changed default address in the lib sources from 0x77 to 0x76)
/***************************************************************************
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
***************************************************************************/
#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 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
// (you can also pass in a Wire library object like &Wire2)
status = bme.begin();
if (!status) {
Serial.println("Could not find a valid BME280 sensor, check wiring!");
while (1);
}
Serial.println("-- Default Test --");
delayTime = 5000;
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();
}
shows something weird:
BME280 test
-- Default Test --
Temperature = 76.46 *C
Pressure = 1024.62 hPa
Approx. Altitude = -94.24 m
Humidity = 33.31 %
Temperature = nan *C
Pressure = 1024.69 hPa
Approx. Altitude = -94.78 m
Humidity = 32.37 %
Temperature = nan *C
Pressure = 1032.18 hPa
Approx. Altitude = -156.40 m
Humidity = 63.69 %
Temperature = nan *C
Pressure = 1024.67 hPa
Approx. Altitude = -94.68 m
Humidity = 67.32 %
So. it looks like the sensor is overheat right before starting, isn't it?
Does anybody faced similar problem? Is the sensor already dead or maybe I can make it working well again?
Also I am not good at the hardware side of the microcontrollers and have only multimeter and soldering iron
Thank you for advance for your answers.