New Project - Pouring Machine (Help Wanted)

I would like some help with my coding because I am new to this and I do not understand why I am getting an error.
The error that I am getting is a Heartbeat Timeout after the pouring function and I cant find a way to solve this.

Can anyone please help me with my code? I attach a copy below.

Machine.ino (12.5 KB)

You should read the "how to use this forum-please read" sticky.

Post your code here, if possible, as described in the sticky. More people will see your code that way.

Post the complete error message. There is a button in the IDE to copy the message (lower right) then paste the error message in a new reply as described in the sticky.

Read the #11 paragraph to get hints on what we need to know to able to help you.

georgiosdelimpasis:
The error that I am getting is a Heartbeat Timeout after the pouring function and I cant find a way to solve this.

I can't find the word "heart" in your program so you need to post the actual message you are getting.

You have over 12k of code so I presume you had an earlier version of the program working without error and the error arose when you added some small extra bit of code. What was that extra bit?

...R

groundFungus:
You should read the "how to use this forum-please read" sticky.

Post your code here, if possible, as described in the sticky. More people will see your code that way.

Post the complete error message. There is a button in the IDE to copy the message (lower right) then paste the error message in a new reply as described in the sticky.

Read the #11 paragraph to get hints on what we need to know to able to help you.

I can not post all my code because its too many words and wont let me also I do not know what the problem to post only a certain code.
And I am not getting an error while I am uploading my code to the Adruino. I am getting a Heartbeat Timeout message inside the Serial Monitor after my function for pouring is over and my ESP8266 just disconnects and reconnects after a while.

georgiosdelimpasis:
I can not post all my code because its too many words and wont let me

In that case add your .ino file as an attachment

Also post the actual message you are getting in the Serial Monitor.

If your program is so long I presume you had an earlier shorter version that was working without an error. What did you add to to that caused the error?

...R

Robin2:
In that case add your .ino file as an attachment

Also post the actual message you are getting in the Serial Monitor.

If your program is so long I presume you had an earlier shorter version that was working without an error. What did you add to to that caused the error?

...R

And I am not getting an error while I am uploading my code to the Adruino. I am getting a Heartbeat Timeout message inside the Serial Monitor after my function for pouring is over and my ESP8266 just disconnects and reconnects after a while.
Also I already uploaded my .ino file here.

Did you just write the whole code at once and then start debugging?
Or do you have code that worked until you added more?

Yes, it could make troubleshooting this a lot easier and faster.
OTOH you could ignore the requests and maybe or not still get help from those who asked.

georgiosdelimpasis:
And I am not getting an error while I am uploading my code to the Adruino. I am getting a Heartbeat Timeout message inside the Serial Monitor after my function for pouring is over and my ESP8266 just disconnects and reconnects after a while.
Also I already uploaded my .ino file here.

Sorry, I had actually noticed your .ino file and then forgot that I had :frowning:

But you have not responded to my request to post a sample of the output from the running program so we can see the actual error message.

Nor have you commented on how you got to 12k of code without earlier testing.

...R

Robin2:
Sorry, I had actually noticed your .ino file and then forgot that I had :frowning:

But you have not responded to my request to post a sample of the output from the running program so we can see the actual error message.

Nor have you commented on how you got to 12k of code without earlier testing.

...R

Hello, all my code is working properly because every line I change I test if it works.
So I think I found what the problem was.
When my while loop is starting Adruino doesn't send any responds to my ESP8266 module because it only checks inside the loop if the weight is changing so the ESP8266 gets a timeout every time it does not get a respond every 10 seconds.