On the face of it, that is a lot. However RGB values are usually 8 bits. If you can constrain them to bytes the RAM requirement is 2400 * 3 files * 3 bytes = 21600 bytes which is manageable if you load the data at the start of your program. An option might therefore be to store the data in a bytearray object. An individual RGB value could be accessed byLornioiz wrote:...It is 2400 rgb tuples (XXX,YYY,ZZZ) each file...
Code: Select all
a = 1900 # tuple no. 0 to 2399
fileno = 1 # 0 to 2
index = fileno * 2400 + a
r, g, b = mybytearray[index: index+3]
I do think reliability will be improved if you can find a way to avoid file operations in an ISR.