Skip to content

Commit

Permalink
Only use plant1 for LED-blink control. Version -> 0.7.1 (#7)
Browse files Browse the repository at this point in the history
* LED blinking only for plant0
* update dependencies, version -> 0.7.1
  • Loading branch information
chl33 authored Sep 19, 2024
1 parent 2b98a31 commit 19a4a31
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
16 changes: 9 additions & 7 deletions lib/watering/watering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,13 +211,15 @@ void Watering::loop() {
}
#endif
m_moisture.read(nowMsec);
const float level = m_moisture.filteredValue();
if (level > m_max_moisture_target.value()) {
m_mode_led.delayedBlink(2000, 2);
} else if (level < m_min_moisture_target.value()) {
m_mode_led.delayedBlink(2000, 3);
} else {
m_mode_led.delayedBlink(2000, 1);
if (m_index == 0) {
const float level = m_moisture.filteredValue();
if (level > m_max_moisture_target.value()) {
m_mode_led.delayedBlink(2000, 2);
} else if (level < m_min_moisture_target.value()) {
m_mode_led.delayedBlink(2000, 3);
} else {
m_mode_led.delayedBlink(2000, 1);
}
}
}

Expand Down
6 changes: 3 additions & 3 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ build_type = release
; ~/Projects2/Plant133/lib/watering
lib_deps =
watering
[email protected]
og3x-oled@0.1.3
[email protected]
og3@^0.2.0
og3x-oled@^0.2.0
og3x-shtc3@^0.2.0
adafruit/Adafruit BusIO
adafruit/Adafruit SHTC3 Library
adafruit/Adafruit Unified Sensor
Expand Down
2 changes: 1 addition & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#include "watering.h"

#define SW_VERSION "0.7.0"
#define SW_VERSION "0.7.1"

namespace {

Expand Down

0 comments on commit 19a4a31

Please sign in to comment.