You may find this excerpt of interest: //Adafruit_GFX. If you have a close look at the code, you'll see. If on the other hand, you've got a single solid-colour background, as I suspect you have - then you could just add a new function to the class. This module includes the SD card socket and SPI FLASH circuit. It's an updated version of my Tiny TFT Graphics Library. This module has a resolution of 480 x 320. This is a small graphics library, specifically aimed at ATtiny microcontrollers, for the variety of small colour TFT displays available at low cost from suppliers like Adafruit, AliExpress, or Banggood: driving an Adafruit 2.0' 320x240 colour TFT display. With the TFT display you can display colorful images or graphics. Of course(?), this approach would be the most suitable for drawing text over animated, complex or calculated backgrounds - drawing text over the top of a plasma, xor-pattern, fractal all come to mind. There are several types of displays compatible with your Arduino, here’s a list of 7 of them. This would be 23 x 22 pixels, 10 x 51 and any other combination whose product didn't exceed 512. Once done, just set the update window to be the area of concern, then simply blit the memory buffer.Īssuming you'd like to reserve 1024 bytes, you'll have space for 512 pixels. Just initialize the memory with your background colour, then use a (self-written) function that will 'print' the data to the memory buffer, rather than the display. Assuming 16bit mode, you'll need 2 bytes per pixel. That is to say, keep some memory set-aside for this area. Without knowing the size of the area to be updated (or the board & hence available RAM), I don't know just how practical this would be for you.īut, why not write your own code to do double-buffering?
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |