The SainSmart 1.8-inch TFT project exercises text, shapes, colors and display inversion using Adafruit’s graphics libraries. Its photographs show several stages of the graphics test, making it a practical reference for checking a newly connected SPI screen.
How the project works
The active constructor uses hardware SPI, and initialization selects INITR_BLACKTAB. The setup routine draws the demonstration graphics; the loop toggles display inversion. Other tab profiles remain in comments for different panel variants.
A joystick-reading helper is included, but the central demonstration is the graphics test. The source provides examples of drawing lines, circles, rectangles and text without requiring a separate application or network connection.
Hardware and configuration
| Item | In the supplied code |
|---|---|
| Controller / library | ST7735 with Adafruit_GFX |
| SPI on Uno | SCK D13, MOSI D11 |
| CS / DC / reset | D10 / D9 / D8 |
| Initialization | INITR_BLACKTAB |
Working with the supplied code
Check the panel’s pin labels and electrical requirements, then confirm that the selected ST7735 initialization matches the screen. Incorrect colors or offsets can indicate a panel configuration mismatch rather than a failed display.
The archived library folder is named Adafruit_ST3775, but the sketch includes Adafruit_ST7735.h. Use the actual header and library identity when setting up the build. The SD library is also present in the folder; the main graphics demonstration does not by itself show loading arbitrary images from a card.

Video demonstration
Source code and project files
Browse this project on GitHub. The project folder includes both graphics libraries and the accompanying display examples. The archived Adafruit_ST3775 directory contains the ST7735 driver described in this article.
- Project graphics-test sketch
- Adafruit_GFX graphics library and license
- ST7735 driver library (archived as Adafruit_ST3775)
- Graphics, rotation and bitmap examples
Download the used libraries (ZIP, 14.7 MB). This collection preserves the archived library versions; Wi-Fi settings and API credentials use placeholders for you to configure locally.
The graphics test is adapted from Adafruit’s example by Limor Fried/Ladyada. Its MIT notice is retained in the source.
These notes describe the archived source and project media. The sketches have not been rebuilt or tested on hardware for this article.


