CamelCaseName / HUB75nano

This Arduino library adds the basic functionality needed to drive a HUB 75 protocol LED Panel up to 64x32 Pixels RGB.
GNU General Public License v3.0
37 stars 6 forks source link

Buffer saturation #5

Closed mtognazzolo closed 2 years ago

mtognazzolo commented 3 years ago

Hello, I wanted to comment on the following problem.

My arduino nano receives a payload with data through the serial port every 30s. After receiving it, it displays it on the panel automatically. After 9 hours of this, the panel starts showing random things. I have been able to verify that it is a matter of saturation of the buffer. Do you have any idea why this could be happening?

Thanks

CamelCaseName commented 3 years ago

hi, i checked for memory leaks, but i am no cpp expert. I could not find any. So that should not be the problem, at least in my library. Maybe you want to increase your serial buffer size by a little, depending on how much ram is left. For stability reasons it is best to only use ~95% of the available RAM. if you are using a pointer declared with a new statement, and not deleting them, it might cause a memory leak. or you are using some scaling data structure with no fixed size, which writes into the pixel buffer. apart from that, i have no more ideas. But i am glad you found a use for my library. Oh you could also try "flushing" the serial buffer from time to time, to clear it again. I don't know how effective this is, tho. happy to "help" Regards, Leonhard