Skip to content

16-bit graphics library for Arduino. Features fonts, bitmaps (1/8/16-bit), hardware/software SPI, advanced graphics and optional framebuffer mode.

License

Notifications You must be signed in to change notification settings

gavinlyonsrepo/display16_LTSM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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, 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 name Type Interface Readme URL link
ST7735 TFT LCD SPI HW & SW github link
ST7789 TFT LCD SPI HW & SW github link
SSD1331 OLED SPI HW & SW github link
ILI9341 TFT LCD SPI HW & SW github link
GC9A01 TFT LCD SPI HW & SW github 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.

Num Function Name Colour support bitmap size max (128X128 screen) Note
1 drawBitmap bi-colour 2048 bytes Data horizontally addressed
2 drawBitmap8Data 8 bit color RRRGGGBB 16384 Data from array, Converted by software to 16-bit color
3 drawBitmap16Data 16 bit color 565 32768 Data from array
4 drawSpriteData 16 bit color 565 32768 Data from array , Draws background color transparent
  1. Bitmap size in kiloBytes = (screenWidth * screenHeight * bitsPerPixel)/(1024 * 8)
  2. The data array for 1 is created from image files using file data conversion tool link
  3. The data array for 2-4 is created from BMP files using file data conversion tool link
  4. 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

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. It is OFF by default. 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

Advanced buffer mode. There is advanced buffer mode where the code writes to a global screen buffer instead of the VRAM of display. It is OFF by default 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