Korekta kontrolki prędkości
This commit is contained in:
@@ -43,7 +43,7 @@ const uint8_t ledMap[LED_COUNT] = {3, 0, 1, 8, 2, 5, 4, 7, 6};
|
|||||||
#define IN_PHOTOTRA 12
|
#define IN_PHOTOTRA 12
|
||||||
#define WTR_LVL 33 //GPIO04 D27
|
#define WTR_LVL 33 //GPIO04 D27
|
||||||
|
|
||||||
#define DIMM_MAX_VALUE 4
|
#define DIMM_MAX_VALUE 3 // docelowo 4, tylko na testy
|
||||||
|
|
||||||
//NEO PIXEL ARDESES:
|
//NEO PIXEL ARDESES:
|
||||||
#define NEOPXL_MULTIPLIER 25
|
#define NEOPXL_MULTIPLIER 25
|
||||||
@@ -183,7 +183,7 @@ void setup() {
|
|||||||
display.println(Version);
|
display.println(Version);
|
||||||
display.display();
|
display.display();
|
||||||
|
|
||||||
delay(500);
|
// delay(500);
|
||||||
pinMode(BTN_RST, INPUT);
|
pinMode(BTN_RST, INPUT);
|
||||||
pinMode(BTN_DIMM, INPUT);
|
pinMode(BTN_DIMM, INPUT);
|
||||||
pinMode(BTN_SPEED, 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) {
|
if (hum > hygrostatVal) {
|
||||||
setFanSpeed (0);
|
setFanSpeed (0);
|
||||||
neoPixelSpeed_1 = 1;
|
neoPixelSpeed_1 = 1;
|
||||||
neoPixelSpeed_2 = 1;
|
neoPixelSpeed_2 = 0;
|
||||||
|
|
||||||
|
if (fanSpeedVal == 2){
|
||||||
|
neoPixelSpeed_2 = 1;
|
||||||
|
}
|
||||||
} else if (hum >= (hygrostatVal - 5) and fanSpeedVal == 2) {
|
} else if (hum >= (hygrostatVal - 5) and fanSpeedVal == 2) {
|
||||||
setFanSpeed (1); //ustaw predkość 1 zbliża sie do docelowej wartości
|
setFanSpeed (1); //ustaw predkość 1 zbliża sie do docelowej wartości
|
||||||
neoPixelSpeed_1 = 4;
|
neoPixelSpeed_1 = 4;
|
||||||
|
|||||||
Reference in New Issue
Block a user