spinjector
Member
I have a Teensy 4.1, audio board, and ILI9341 TFT display. There's some graphics & text, FFT, and eventually additional functions like reading various digital IO & sensors.
How does one keep the TFT updated on time without interruptions or flicker, while attending to the asynchronous things like button presses, and waiting for WAV files to play & stop..? Does everything have to be in the main Loop{} with branches to handle them, or do I need to learn interrupts, or what exactly..? I'm assuming there's no multi-tasking...or is there..?
I was thinking a series of If{} blocks for each activity, followed by a screen update, and finally a nested loop to wait for a timer value to decrement to zero before looping again. And then hope the combined duration of all activities doesn't exceed the length of the timer and cause a screen refresh to be delayed or skipped.
Not sure which way to go...
Thanks.
How does one keep the TFT updated on time without interruptions or flicker, while attending to the asynchronous things like button presses, and waiting for WAV files to play & stop..? Does everything have to be in the main Loop{} with branches to handle them, or do I need to learn interrupts, or what exactly..? I'm assuming there's no multi-tasking...or is there..?
I was thinking a series of If{} blocks for each activity, followed by a screen update, and finally a nested loop to wait for a timer value to decrement to zero before looping again. And then hope the combined duration of all activities doesn't exceed the length of the timer and cause a screen refresh to be delayed or skipped.
Not sure which way to go...
Thanks.