PaulS:
- How can i switch number of relays in one tact like: "Measure for DHT11 #1, DHT11 #2, DHT11 #3, DHT11 #4, then switch Relays # 1,3,4 On and wait 30 sec< then OFF for all"?
I'm not sure that I understand the question. Are the relays linked to the temperature sensors? That is, if temperature sensor 2 reads high, do you activate relay 2?
If so, then the sensor and relay actions are not linked to other sensor and relay actions. Read sensor n. Make a decision regarding it's value. Implement the decision. Record when the decision involved turning the relay on.
Separately, check the on time(s) (for the relay(s) that are on (on time is not 0)) against the current time, to see if it is time to turn the relays off (and clear the on time).
No!
Measurement takes me state of relays.
T1=10 (too cold) - do the switching
T2=25 (too cold) - do the switching
T3=35 (normal) - do nothing
T3=28 (too cold) - do the switching
so there i have triggering rule:
DigitalWrite (3, HIGH);
DigitalWrite (4, HIGH);
DigitalWrite (5, LOW);
DigitalWrite (6, HIGH);
Delay(30000); - or like, were told, some construction from BlinkWithoutDelay
DigitalWrite (3, LOW);
and so ...
And if rule will be ON OFF OFF OFF
I must write whole section with
DigitalWrite (3, HIGH);
DigitalWrite (4, LOW);
DigitalWrite (5, LOW);
DigitalWrite (6, LOW);
Delay(30000); - or like, were told, some construction from BlinkWithoutDelay
DigitalWrite (3, LOW);
and so ...
Or possible do it with some function?