Korekta kontrolki prędkości

This commit is contained in:
sieja
2025-06-28 20:56:43 +02:00
parent 4772effeea
commit c1551340ee

View File

@@ -43,7 +43,7 @@ const uint8_t ledMap[LED_COUNT] = {3, 0, 1, 8, 2, 5, 4, 7, 6};
#define IN_PHOTOTRA 12
#define WTR_LVL 33 //GPIO04 D27
#define DIMM_MAX_VALUE 4
#define DIMM_MAX_VALUE 3 // docelowo 4, tylko na testy
//NEO PIXEL ARDESES:
#define NEOPXL_MULTIPLIER 25
@@ -183,7 +183,7 @@ void setup() {
display.println(Version);
display.display();
delay(500);
// delay(500);
pinMode(BTN_RST, INPUT);
pinMode(BTN_DIMM, INPUT);
pinMode(BTN_SPEED, INPUT);
@@ -296,10 +296,17 @@ void loop() {
}
}
// jeśli nieosiągnieto bliskiej wilgotności - zaświec diody
// jeśli osiągnięto bliską wilgotność na 2 biegu zaświeć jedną i przciemnij drugą
// jeśli osiągnięto wilgotność przyciemnij diody zależnie od biegu
if (hum > hygrostatVal) {
setFanSpeed (0);
neoPixelSpeed_1 = 1;
neoPixelSpeed_2 = 1;
neoPixelSpeed_2 = 0;
if (fanSpeedVal == 2){
neoPixelSpeed_2 = 1;
}
} else if (hum >= (hygrostatVal - 5) and fanSpeedVal == 2) {
setFanSpeed (1); //ustaw predkość 1 zbliża sie do docelowej wartości
neoPixelSpeed_1 = 4;