Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 5172

MicroPython • Re: Code getting stuck after count

$
0
0
I'm having some trouble with the following code. It runs but gets stuck for hours after the countdown reaches 00:00:01 for some reason.

[ ... ]

any help would be hugely appreciated

You have three countdown timers. Each for the same 4 hours.

That is, blocks of code that begin with

Code:

for seconds_remaining in range(total_seconds, 0, -1):
After each one you unconditionally sleep() for a further 4 hours.


Maybe it is doing what you asked. But what you asked is not what you actually wanted...

Statistics: Posted by B.Goode — Fri Aug 02, 2024 11:51 am



Viewing all articles
Browse latest Browse all 5172

Trending Articles