I'm wanting to work on a project that will involve updating a display quite quickly. I've got a few 1.8 Inch TFT's from eBay that I've been working with and all seems fine, except...
When I call fillScreen(BLACK) to clear down the current display it seems to reset the variable I'm using to update and then refresh the screen.
The situation is, I have a rotary encoder that adds to a variable clockwise and decrements anti-clockwise. If I pump this out on the serial, I see it go up & down as expected. If I write the value to the screen however then call fillScreen to wipe the previous text, my counter is reset. Just calling print overwrites the text so it's unreadable.
I am likely doing something half daft. If anyone has any ideas I'll give them a go.
OK, an update. I've got the below code to work but seems a bit of a hack. If there is a cleaner way, please let me know! I'm also not convinced the refresh rate is quite where I'll need it, but I can worry about that another day.
Your screen doesn't share Analog pin your encoder is attached to?...Also your Analog reads could be interfered with as the Screen itself is probably hogging the ADC ..meaning the analog read function will return no value while the screen is busy ...just some thoughts