11-11-2021, 01:40 AM
Ok, use this code instead.
You should have this function at around line 2795.
Delete everything above and paste everything below. I added comments, the original pulse is 2.2 seconds, you can change that if you like.
The for loop runs 10 times creating 10 pulses, the delay between on and off during the pulse is 0.5 seconds. You can set that delay how you like and change the 10 to the number of pulses you want.
You should have this function at around line 2795.
Code:
void stopAutoFeeder()
{
if (millis() - prevMillisFeed > 2200)
{
digitalWrite(fishFeederPin, LOW);
feederActive = 0;
}
}
Delete everything above and paste everything below. I added comments, the original pulse is 2.2 seconds, you can change that if you like.
The for loop runs 10 times creating 10 pulses, the delay between on and off during the pulse is 0.5 seconds. You can set that delay how you like and change the 10 to the number of pulses you want.
Code:
void stopAutoFeeder()
{
if (millis() - prevMillisFeed > 2200) // original pulse 2.2 seconds
{
for (byte b = 0; b < 10; b++) // 10 extra pulses
{
digitalWrite(fishFeederPin, HIGH);
delay(500); // delay between on/off pulse
digitalWrite(fishFeederPin, LOW);
}
feederActive = 0;
}
}