Wow! Connected MISO and it works now. I was always sure MISO is not used by displays. And it says everywhere 'is not required if the SPI bus is used only for the display'.
Thank you!
There is no hard rule on this... It really depends on which display control chip is used and in some cases whose display...
Some displays don't support reading anything on the display and as such not needed. I think the ST77xx chips are like this
Some won't work without them. I think RA8875/76 are like this.
In this case with the ILI9341 - it is sort of up to you. If you wish to read the registers or read pixels back in, then you need it
else you don't
Note some displays like many of the ILI9488 boards Again I believe you can read pixels back with it (would have to double check)
BUT: their MISO pins don't play nicely and they drive the IO pin High and Low (no tri-stating) So if you use the MISO pin directly
it does not share... Some of these displays add their own buffer chip or the like to handle this, with others you would have
to do this yourself if you wish for multiple things on the SPI buss.
I wonder, is there a way to change scroll direction? Like, scroll up or down?
Also, it is worth mentioning, maybe, that with Teensy scrollTest (and many others) does not proceed if serial monitor window is not opened in Arduino IDE.
Simply comment out
I typically add the above line with a timeout... Like: while (!Serial && (millis() < 5000)) {}
will wait for up to 5 seconds for the Serial to connect... Note the above assumes at start of sketch so just uses millis() as it
is good enough. If wanted in more general areas you could use something like elapsedMillis object for the timing...
If you think this is 'fairly easy' - can you provide a modified code to scroll forward and backward?
It does not seem obvious to me.
It should not be too difficult, but personally I am busy playing on other stuff...
But try making a copy of the scrollTextArea area code I included earlier (give it a different name) like:
scrollTextAreaDown.
Then instead of copying lines up starting at the top and reading the line: at the top + scroll_size and then writing
it to the top line, and then increment to do the next lines...
You start copying from the bottom. That is you read the line at the logical bottom line - scroll_size and copy it down to
the bottom line and decrement and walk your way up the buffers...
And obviously change the rectangle that you clear at the end...