toblum / esp_p10_tetris_clock

A tetris clock based on a 16x32 RGB matrix and a ESP8266
MIT License
49 stars 17 forks source link

Issue with freezes on intermittent Wi-Fi #8

Open possibly-not opened 4 years ago

possibly-not commented 4 years ago

Hi! I absolutely love this, I've currently got it running and it was so easy to setup which surprised me! I'm having an issue where sometimes esp8266 disconnects from WiFi and during re-connection the whole display freezes. And even when it's just disconnected (I think) the display freezes for a bit and then keeps going seemingly without Wi-Fi too. I will be trying to figure out a work around or even what the actual issue is. In the mean time I'll just be moving it closer to my Wi-Fi AP.

toblum commented 3 years ago

Hi @Possibly-Matt,

I noticed also that the ESP8266 sometimes freezes when it's occupied with WiFi communication, especially when handling errors. I didn't really find a way to handle this better, because everything runs on one core and when it's occupied it just freezes. On the ESP32 this would be easier, because it has two cores and WiFi communication and animations can run without interference on separate cores.

Let me know if you find some optimizations.

Best regards Tobias

possibly-not commented 3 years ago

Thanks for the response @toblum , ah of course! I should've realized. Now this has got me considering how long the esp8266 can go without re-syncing with NTP before it gets too far out. Depending on how quickly it moves out, it could be possible to have the sync be timed right between the stop of the animation + second even to quickly shoot off a request before the next minute and hope for its speedy return and even then have this happen only once an hour possibly. Still, for now the clock has been working really great for me actually, I've moved some things about inside the box to reduce interference so for me I'm not sure how pressing any optimisations would be.