![]() I wrote some code to display numbers as seven segment digits and draw the numbers with only seven calls to fillRectangle. Here is the code I was using to do my testing. ![]() Once I figure that out I'll write up another blog post. ![]() I am going to continue to work on this more and figure out how to selectively redraw only digits that change. When you redraw something that hasn't changed it looks like flashing. This is because it is being blanked out and redrawn every time the number changes. If you watch the last video again, once the number goes past single digits the left digit looks like it is flashing. What I am realizing at this point is you should only redraw information that has changed. In this next video I have highlighted the redraw area in red to make it easier to see what I am talking about: Only blanking out that small area greatly sped up the redraw time. Next I tried drawing a black rectangle just on the area of the screen where I was drawing numbers. It takes quite a while to redraw the entire screen with black. The mistake I made was blanking out the entire screen with tft.fillScreen(ILI9340_BLACK). The redraw time causes the numbers to look like they are flashing which is very annoying. To test the display I wrote a simple sketch that just displays the number of seconds since start. One concern I had about using it for that purpose was the speed that an Arduino board could refresh the information on the screen. I was really hoping to use this display to show the current speed of my car. One of the displays I ordered is a 2.2" color TFT LCD display. I'm working on a digital speedometer project for my car and I ordered a couple different displays from Adafruit to experiment with.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |