Hi!
I wrote a very long piece of code to control 10 different tft displays, making use of the "select/case" method.
However, it would be much easier if I can use a single function, with an extra argument, to change the screen it displays on dynamically.
That means, I now have ten times this:
Void drawSomething1 (bmp);
tft1.startWrite();
tft1.setAddrWindow();
tft1.endWrite();
Void drawSomething2 (bmp);
tft2.startWrite();
tft2.setAddrWindow();
tft2.endWrite();
etc.
i would need something like this
Void drawSomething (bmp, selectedscreen);
selectedscreen.startWrite();
selectedscreen.setAddrWindow();
selectedscreen.endWrite();
In this way one function would take care of everything.
But: When I try to use a variable instead of tft1, tft2, etc, the library doesn't recognize the command anymore.
Can anybody point me in the right direction for solving this?
Thanks in advance!
Best regards
Bart