Replies: 1 comment 3 replies
-
would need to see some code in use... could be something simple like you used tried offloading some stuff to the second core? this is how i do that
then in my loop i will do this:
There is a better way, try using the ntptime lib, in my testing sometimes it does not work and errors... see mountain of code below... Though i went out of my way to make a very robust way to set the time with a backup method, though dealing time zones and DST are a PITA... my backup method takes advantage of my pico asking my server for it's config as it send the current time with it just in case ntptime fails me
i also run a modded time lib
then i deal with DST
here is the PHP i run on my sever to report DST to the PICO
|
Beta Was this translation helpful? Give feedback.
-
Hi,
I made my own LED panel composed of several ws2812b in a 7 seg style to display time and temp.
The code runs well for several hours than comes to a sluggish speed.
What I've done:
Using asyncio to eliminate blocking codes.
Using a task to read city's temp and store it into a variable every 30 minutes.
Using a task to get epoch every 3 hrs and update the RTC.
Using collect() to recycle as much memory as possible.
Using the main loop to display time and a non blocking code (while (time.time() - start_time) > max_loop_time:) to display the temperature.
When requesting temperature and time data, return is used if an error or no data is returned so the tasks wont halt.
I'm trying, at the moment, to count the delay in the time display routine so that, when the code recovers from being sluggish, resets the device but it's not the route I want to take.
The same fashion code is running fine on other types of LED display.
I'm at a total lost since no errors are caught.
So, I appreciate any help or indication I can get.
TIA
Beta Was this translation helpful? Give feedback.
All reactions