Repetaing Terminal Prints

 boolean pumpBstate = false;
  if (pumpBon == 1) pumpBstate = true;
  if (now.hour() == 18 && now.minute() >= 0 && now.minute() < 1) pumpBstate = true;     //6:00 pm - 1 mins -//- 1 hour after light on
  //if (now.hour() == 20 && now.minute() >= 30 && now.minute() < 40) pumpBstate = true;   //8:30 pm - 10 mins
  //if (now.hour() == 23 && now.minute() >= 0 && now.minute() < 10) pumpBstate = true;     //11:00 pm - 10 mins
  //if (now.hour() == 1 && now.minute() >= 30 && now.minute() < 40) pumpBstate = true;    //1:30 am - 10 mins
  //if (now.hour() == 4 && now.minute() >= 0 && now.minute() < 10) pumpBstate = true;     //4:00 am - 10 mins
  if (pumpBstate == true)
  {
    Blynk.virtualWrite(V10, 1);
    digitalWrite(pumpB, TURN_ON);
    terminal.println ("Veg Feed On")
        }
  else
  {
    pumpBon = 0;
    Blynk.virtualWrite(V10, 0);
    digitalWrite(pumpB, TURN_OFF);
    terminal.println ("Veg Feed Complete")
      
}
  terminal.flush();

I am looking for assisctance with the “Veg Feed Complete”
It just repeats non stop.
How I I terminal print once when the action happens only?

Thanks

You need a simple “state change” routine.

2 Likes

OK Ill see if I can figure that out.

Google is my friend.

1 Like

Costas I tried searching this but am coming up empty.

I am not a coder and struggle to get by so I am curious if you have an example or other term I could google to figure this out.

Seems I cant find anyone with this issue which tells me I am searching wrong.

I appreciate your help.