Hi!
This part is related with calibration so, this changes are useless.
digitalWrite(dosadora[dosadora_selecionada], HIGH);
verifica_dosometriche = false;
delay(60000);
digitalWrite(dosadora[dosadora_selecionada], LOW);
verifica_dosometriche = true;
This part is wrong!
tempo_dosagem = map (((dose_dosadora_personalizada_e[i] / quantidade_dose_dosadora_personalizada_e[i])*2), 0, fator_calib_dosadora_e[i], 0, 60000);
tempo_dosagem /= 2;
verifica_dosometriche =false;
digitalWrite(dosadora[i], HIGH);
delay(tempo_dosagem);
digitalWrite(dosadora[i], LOW);
verifica_dosometriche = true ;
Delete this line:
verifica_dosometriche = true ;
After change the flag to false you need reset the time like this:
PreviousMillis = millis();
The variable "previousMillis" is used to others function you need create a new.
The logic here is wrong!
if (millis() - previousMillis > 60000) // 60 seconds
{
verifica_dosometriche = false;
To turn on the skimmer again the variable "verifica_dosometriche" need be true.
See what you did here:
if((analogRead(sensor3) < 400)||(verifica_dosometriche==false))
{
digitalWrite(skimmerPin,LOW);
}
Best regards.