Hello, good evening is my first post.
I have been using BLYNK for a long time in my home with LOCALSERVER and the truth never ceases to amaze me …
I’m in doubt since I do not have another SHIELD to do the test
Before uploading the code LIVE I want to ask several questions.
The idea here is:
THAT AFTER 14 HOURS
The “BombaPresurizadora” has to turn on and “SelenoideTanke” has to turn ON.
void presurizadora() { if (hour() < 14) { if (EstadoBombaPresurizadora != HIGH) { EstadoBombaPresurizadora = !EstadoBombaPresurizadora; digitalWrite(BombaPresurizadora, EstadoBombaPresurizadora); Blynk.virtualWrite(V11, EstadoBombaPresurizadora); digitalWrite(SelenoideTanke, LOW); Blynk.virtualWrite(V10, SelenoideTanke ); Blynk.notify("Agua Normal"); EstadoBombaPresurizadora = HIGH; } else { EstadoBombaPresurizadora = LOW; digitalWrite(BombaPresurizadora, HIGH); Blynk.notify("Agua Presurizada"); } } }
The second question is related to the same
The idea is that if after 5 AM the “SensorPorton” is LOW - the “ReflectorPorton” should be set to HIGH.
When the “SensorPorton” is no longer LOW - the “ReflectorPorton” should be set to LOW.
void portonabierto() { if (hour() < 05) { if (digitalRead(SensorPorton) == LOW) { if (EstadoSensorPorton != LOW) { EstadoReflectorPorton = !EstadoReflectorPorton; digitalWrite(ReflectorPorton, HIGH); Blynk.virtualWrite(V3, HIGH); Blynk.notify("Porton Abierto"); } EstadoSensorPorton = LOW; } else { EstadoSensorPorton = HIGH; digitalWrite(ReflectorPorton, LOW); Blynk.virtualWrite(V3, LOW); } } }
The other question I also have is to know the subject of intervals well.
timer.setInterval (100L, portonabierto); timer.setInterval (1000L, presurizadora);
I attach all the complete code here, it has other things that I control.
Thank you very much to everyone who can help me.
PS: I’m from ARGENTINA & use the translator.