As I said in older post, I´m creating a software for my led panel. It will, among other things, show messages from the user's phone. I´m using bluetooth for now, but to avoid the use of another app for mobile, I will use a web server on the arduino mega. I have a version working.
I was facing stability and memory problems, because I was using many timers, and it was having a weird behavior.
So I decided to create a kind of script, to be processed in the loop, showing the time, temperature, pressure (!!!), images, the messages, and this queue was a much needed feature.
My first attept to create this queue was a disaster. I don't know why, but my background processing and the timers and arrays was interfering with the led display memory, and weird things was happening until the arduino freezes completely.
I changed all the logic, and now the code is easy, clean, easy to understand. Your code will helpo too much this approach.
I have a short deadline due to the events dates being near.
Thank you again.