display16_LTSM Readme

March 6, 2026 ยท View on GitHub

Website Rss Donate

display16_LTSM Readme

Table of contents

Overview

  • Name : display16_LTSM
  • Title : Graphics Library for 16-bit color graphic displays for Arduino eco-system.
  • Description :
  1. C++ Library to support 16-bit color graphic displays.
  2. Graphics class included.
  3. Bitmaps supported: 1, 8, and 16 bit + sprites.
  4. Multiple displays supported, see supported-devices below, new components can be added. Device display driver are separate libraries that import this one. User can write their own if device not supported.
  5. 16 fonts included, new fonts can be easily added without changing source code
  6. URL project github link
  • Author: Gavin Lyons

Installation

The library is included in the official Arduino library manger and the optimum way to install it is using the library manager which can be opened by the manage libraries option in Arduino IDE.

Supported devices

Component drivers are separate dependent downstream libraries that include this library.

Component nameTypeInterfaceReadme URL link
ST7735TFT LCDSPI HW & SWgithub link
ST7789TFT LCDSPI HW & SWgithub link
SSD1331OLEDSPI HW & SWgithub link
ILI9341TFT LCDSPI HW & SWgithub link
GC9A01TFT LCDSPI HW & SWgithub link
GC9D01TFT LCDSPI HW & SWgithub link

Software

API Documentation

Code is commented for doxygen API documentation software.

Fonts

The font system readme is in the 'doc' folder at link.

Bitmaps

Functions to support drawing bitmaps & sprites.

NumFunction NameColour supportbitmap size max (128X128 screen)Note
1drawBitmapbi-colour2048 bytesData horizontally addressed
2drawBitmap8Data8 bit color RRRGGGBB16384Data from array, Converted by software to 16-bit color
3drawBitmap16Data16 bit color 56532768Data from array
4drawSpriteData16 bit color 56532768Data from array , Draws background color transparent
  1. Bitmap size in kiloBytes = (screenWidth * screenHeight * bitsPerPixel)/(1024 * 8)
  2. The data arrays for image created using conversion tool link
  3. 8-bit bitmaps only take half the memory of 16-bit bitmaps, at the expense of color depth: 256 colors vs 65,536 colors.

Advanced Graphics Mode

It is OFF by default. There is an advanced graphics modes in library. Standard graphics supports drawing lines, pixels rectangles, triangles, circles and rounded rectangles. Advanced graphics supports drawing polygons, dot grid, quadrilaterals, arcs, ellipses and lines at an angle. If you want these 'advanced' functions, simply comment in define dislib16 ADVANCED GRAPHICS ENABLE in display16 common LTSM.hpp. This will enable advanced graphics mode. If this is disabled some examples may not work fully or even compile.

Advanced buffer mode

It is OFF by default. Advanced buffer mode. There is advanced buffer mode where the code writes to a global screen buffer instead of the VRAM of display. More details at readme, which is in the 'doc' folder at link. This mode is only for high RAM MCUs.

Debug Mode

This is OFF by default If debug mode is enabled: error messages, warnings & important information is sent to serial monitor. User ino file must enable serial port. To enable simply comment in define dislib16 DEBUG MODE ENABLE in file display16 common LTSM.hpp.

File system

File system Hierarchy:

 pic

Error Codes

Most functions that return a value, return a enum. Zero for success and a positive number for an error code. The enum is in file: display16 common LTSM.hpp.

Notes