Works for 20s then OPENOPENOPENOPENOPENOPENOPEN...

When I hit the reset button my buttons (open, close, and stop) work fine for 20 seconds then the buttons stop working. (VIDEO of the issue)

I added Serial.Write in the loop, open, close, and stop functions.

What I found:

First 20 seconds:
Motor responds as expected.
Serial Monitor: close = “close”, stop = “stop”, open = “openKKKKKKKKK…” or “open<<<<<<<…” or “openxxxxxxxxxxxx” or “openBBBBBBBBBBB…” etc.

After 20 seconds:
Motor does not respond.
Serial Monitor: close = “close”, stop = (no response), and Open = “openopenopenopenopenopenopen…” and so on for as long as I hold the button.

Nice; would be nicer if you posted the code (and use code tags). And a schematic (photo/scan of handdrawn is fine) how everything is connected would be the cherry on the cake.

Pure guess as too little information is given... Variable overflow or signed variable becoming negative.

There is a bug in the code you have not posted, suggest you fix the bug and try again.

If you need help finding and fixing the bug, you'll need to post the code - we are not psychic.

I DO have a crystal ball. But at the moment it is covered in fingerprints and I am fresh out of glass cleaner.

You will find some useful advice in this video: https://www.youtube.com/watch?v=tdQL_7osGzc