It will be useful to have a way to run the LED matrix sequence in the background.
Currently, the void playSequence(bool loop = false) method of the Matrix LED library waits for the entire run of the animation, which could be forever if the loop parameter is true.
I think a possible implementation is to make the matrix library support this async behavior with a parameter in the begin function, i.e., begin(bool async = false). If async is true, the library will spawn a thread that will handle animation in the background. The user could start and stop the animation with the following method
void playSequence(bool loop = false)
void stopSequence()
It will be useful to have a way to run the LED matrix sequence in the background.
Currently, the void playSequence(bool loop = false) method of the Matrix LED library waits for the entire run of the animation, which could be forever if the loop parameter is true.
I think a possible implementation is to make the matrix library support this async behavior with a parameter in the begin function, i.e.,
begin(bool async = false). Ifasyncis true, the library will spawn a thread that will handle animation in the background. The user could start and stop the animation with the following methodvoid playSequence(bool loop = false)void stopSequence()