The SSH host key has changed on 8 April, 2022 to this one: SHA256:573uTBSeh74kvOo0HJXi5ijdzRm8me27suzNEDlGyrQ

[Bugfix] Make BMP180 sensor code work

The variable name was wrong, and Wire wasn’t initialized when the sensor was enabled.
main
Gergely Polonkai 2 years ago
parent b5dae4a1ce
commit f69efbd224
No known key found for this signature in database
GPG Key ID: 2D2885533B869ED4
  1. 6
      WeatherStation.ino

@ -60,7 +60,7 @@ BH1750 light;
#endif // HAVE_BH1750
#ifdef HAVE_BMP180
Adafruit_BMP085 BMP;
Adafruit_BMP085 bmp;
#endif // HAVE_BMP180
#if SYSTEM_MODE & MODE_PROM_PULL
@ -152,9 +152,11 @@ setup()
pinMode(RAIN_PIN, INPUT);
#endif // RAIN_PIN
#ifdef HAVE_BH1750
#if defined(HAVE_BMP180) || defined(HAVE_BH1750)
Wire.begin(I2C_SDA_PIN, I2C_SCL_PIN);
#endif // HAVE_BMP180 || HAVE_BH1750
#ifdef HAVE_BH1750
if (!light.begin()) {
Serial.println("Could not find the BH1750 sensor!");
stop();

Loading…
Cancel
Save