Skip to content

Commit 1dd15ce

Browse files
committed
remove BME280 sensor
1 parent 3142017 commit 1dd15ce

File tree

5 files changed

+1
-33
lines changed

5 files changed

+1
-33
lines changed

README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,7 @@ Topic: wateringsystem/`{device ID}`/out/`{command}`
7373
| network.wifiQuality | quality of signal strength (value between 0 and 100%) | number |
7474
| network.wifiSsid | SSID of connected wifi | string |
7575
| network.ip | ip address of the module | string |
76-
| weather.temperature | temperature of the BME280 sensore (in °C) | number |
77-
| weather.humidity | humidity value of the BME280 sensor (in %) | number |
78-
| weather.pressure | pressure of the BME280 sensor (in hPa ) | number |
79-
| weather.altitude | estimated altitude above sea level | number |
76+
8077

8178
## Sketch
8279

docs/sketch.fzz

-1.67 KB
Binary file not shown.

docs/sketch_bb.png

-19.5 KB
Loading

platformio.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,4 @@ lib_deps =
3232
https://github.com/marvinroger/async-mqtt-client.git
3333
ArduinoJson@6.18.0
3434
Adafruit INA219@1.1.1
35-
adafruit/Adafruit BME280 Library @ ^2.1.4
3635
juerd/ESP-WiFiSettings @ ^3.8.0

src/main.cpp

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
#include <ArduinoOTA.h>
44
#include <AsyncMqttClient.h>
55
#include <Adafruit_Sensor.h>
6-
#include <Adafruit_BME280.h>
76
#include <Adafruit_INA219.h>
87
#include <ArduinoJson.h>
98
#include <SPIFFS.h>
@@ -23,7 +22,6 @@ TimerHandle_t mqttReconnectTimer;
2322
TimerHandle_t wifiReconnectTimer;
2423
TimerHandle_t waterpumpTimer;
2524

26-
Adafruit_BME280 bme;
2725
Adafruit_INA219 ina219;
2826

2927
// states
@@ -150,13 +148,6 @@ void sendInfo()
150148
network["wifiSsid"] = WiFi.SSID();
151149
network["ip"] = WiFi.localIP().toString();
152150

153-
// weather
154-
JsonObject weather = doc.createNestedObject("weather");
155-
weather["temperature"] = bme.readTemperature();
156-
weather["humidity"] = bme.readHumidity();
157-
weather["pressure"] = bme.readPressure() / 100.0F; // in hPa
158-
weather["altitude"] = bme.readAltitude(SEALEVELPRESSURE_HPA); // in m
159-
160151
String JS;
161152
serializeJson(doc, JS);
162153

@@ -356,24 +347,6 @@ void setupTimers()
356347
waterpumpTimer = xTimerCreate("waterpumpTimer", pdMS_TO_TICKS(1000), pdFALSE, (void *)2, reinterpret_cast<TimerCallbackFunction_t>(onWaterpumpTimerTriggered));
357348
}
358349

359-
void setupBME280()
360-
{
361-
if (!bme.begin(0x76))
362-
{
363-
Serial.println("Could not find a valid BME280 sensor, check wiring!");
364-
/*while (1);*/
365-
366-
return;
367-
}
368-
369-
// weather monitoring
370-
bme.setSampling(Adafruit_BME280::MODE_FORCED,
371-
Adafruit_BME280::SAMPLING_X1, // temperature
372-
Adafruit_BME280::SAMPLING_X1, // pressure
373-
Adafruit_BME280::SAMPLING_X1, // humidity
374-
Adafruit_BME280::FILTER_OFF);
375-
}
376-
377350
void setupOTA()
378351
{
379352
ArduinoOTA
@@ -472,7 +445,6 @@ void setup()
472445

473446
setupPins();
474447
setupTimers();
475-
setupBME280();
476448
setupIna219();
477449

478450
WiFi.onEvent(onWiFiEvent);

0 commit comments

Comments
 (0)