m5stack / M5-ProductExampleCodes

All example codes of products supplied by M5Stack have been collected in this reposity.
MIT License
339 stars 485 forks source link

ENV code not working #8

Closed bert2002 closed 5 years ago

bert2002 commented 5 years ago

Hi, just got my ENV unit and wanted to bring it alive with my M5stack and unfortunately it is not working. The example code in Unit/ENV/Arduino/ENV/ENV.ino gives me this:

20:39:16.008 -> M5Stack initializing...OK
20:39:16.650 -> ENV Unit(DHT12 and BMP280) test...
20:39:16.650 -> Could not find a valid BMP280 sensor, check wiring!

When I try my own code on it with following code:

if (!bme.begin(0x76)){  
      Serial.println("Could not find a valid BMP280 sensor, check wiring!");
      while (1);
    }

Then it will work.

graydonli commented 5 years ago

Thanks, I updated this example code.