He posted this comment:Btw. the example you post is not that good on ESP - because it could be that the ESP reboots, because you do all the animation stuff inside the callback of the MQTT client.
So if you get new mesaages, it could be blocked and the stack will overflow...
It is better to just set any flags and store the topic and messsage to variabnle
and set a flag, that new message arrived
And inside the loop you check for new messages and do the processign and animations
Also please always check for new mesage flag inside effect loops and return if new arrived
So you are on the safe way and did not get any stack overflows - and it is always up to date ;)
deletestatements cause crashes, every time!