if (Output < millis() - windowStartTime)
{
digitalWrite(RELAY_PIN, LOW);
// Read the voltage and current here.
// Calculate power and multiply by
// Output/10000 to get average power.
}
else
1 Like