One section of code constantly causes Blynk to disconnect

Wouldnt having timer.disable in the void loop cause that section code to only run once? Are you saying I should have my if statements based on time/temp around that.

void premashstuff(){
  timer.disable(premashtimer);
  // do premashstuff
  timer.enable(mashtimer);  
}

For example I should have that when mash conditions are met, then you disable premash timer and enable mashtimer, but until then the premashtimer continues to be enabled. Sorry if I am missing a component of how this library works.

Also, coming back to the hop addition code; with those updates you mentioned you were able to not have the board crash and the hop addition notification worked? So if I can figure out some sort of counter then the hop notify once should work?

You are right about the functions only running once based on the disable timer. I was expecting you to be using the 1 minute timer to check when each function should end and that each function does only need to run once.

Maybe they need to run more than once but I’m not a brewer so I don’t know.

You don’t want an enormous piece of code in the 1 minute timer though so again if you want to put some code in the functions to run over and over then by all means ensure you don’t disable the timer until that phase is complete.

Yes with the hacks I did I was able to get the push message and the ESP didn’t crash but as per my earlier comments I wasn’t running through from start to finish. I was forcing entry to case 9 simply by making the condition true (whatever it was). If I added Cascade the push message stated add: Cascade or something to that effect, but I was concerned it wasn’t notifying me when to add the second or third hop. I’ll leave that part for you to fix.

I was able to work on the code today finally; and I think I have it working although it still needs a full brewing test run.

  1. Added counters so that the hop reminder would only happen once for each hop input by creating a hop counter array that mirrored the HOPINFO and HOPADD arrays
  2. By having the terminal input finish with the delimiter (in my case “,”) it will include all inputs
  3. No crashing

Thanks for all the feedback and I will get to brewing a full batch asap.

1 Like

Awesome, @Costas and I will send you our addresses for delivery, lol :wink:

3 Likes

Yes @Lichtsignaal I’m looking forward to sampling Phil’s next batch.

1 Like