Tinkercad: Arduino Uno R3 auto-restart/reboot abruptly

We struggled heroically with your code, and we are done. Fixing it will change your code into our code.

The button handling can't be easily fixed. The logic of starting the water running is confused by the logic for pausing/restarting the water. Quite a tnagle.

Recommendation: start over using a finite state machine approach coded hewing to the IPO model for control programs.

google

arduino two things at once
arduino finite state machine

and learn about the IPO model in the abstarct here:

The IPO Model.

In all our hacking, there was never any sign of the exact issue you came here for. The conclusion we reach is that something in tinkercod is messing with you.

The wokwi simulation should function like you would think just reading the code, that is to say without either the "Arduino restart/reboot" or "À".

Are you 100 percent sure you posted the sketch that has this issue?

I am out. I got nothing on the problem you presented.

a7

1 Like