Why does this not show any Data or time advance?

I loaded this onto a Nano (328P Old Bootloader)and it will not actually show any temp/px/hum data. Just shows the "T", "H", "P" headers on the line where the data is supposed to be.

Also, I assumed you should see the time advance on the display but all it does is show static the date and time at boot.

Does somebody have a minute to look it over to see a possible reason?

The original post showed it on a "Full Size" UNO. I don't know if the Nano is the issue or the actual code.

I tried to post the code but it gives the "More than 9000" error. I thought that was the whole point of code wraps........not counted against character count.......anyway, attached in a txt.

TIA

BMP280.txt (8.75 KB)

Hi David,

usually the begin-function reports if the "begin" was successfull or not.
the code you have posted does not check for this. So this code is another example of doing it quick & dirty
inside the setup-function you can replace

void setup()
{
  pinMode(button1, INPUT_PULLUP);
  pinMode(button2, INPUT_PULLUP);
 
  rtc.begin();          // initialize RTC chip
  lcd.begin(20, 4);     // initialize LCD module
  lcd.setCursor(0,  0);  lcd.print("TIME:");
  lcd.setCursor(0,  1);  lcd.print("DATE:");

the line

  rtc.begin();          // initialize RTC chip

with

if (! rtc.begin()) {
    Serial.println("Couldn't find RTC");
}

another thing to check is the I2C-Adress of the BME280 sensor

see here inside the code

// define BME280 sensor I2C address: 0x76 or 0x77 (0x77 is library default address)
#define BME280_I2C_ADDRESS  0x76
// initialize Adafruit BME280 library
Adafruit_BME280  bme280;

So do a check with the I2C-Scanner.
There is a sketch named i2c_scanner.ino in the examples for doing this
This sketch will report on which I2C-Adress an I2C-device is found

best regards Stefan

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.