Introduction
evive has a 1.8” TFT Display which is mainly used for visual feedback. The display has a 128 x 160 color pixels. The TFT driver (ST7735R) can display full 18-bit color (262,144 shades).
ST7735R Driver
The ST7735 is a single-chip controller/driver for 262K-color, graphics type TFT-LCD. It consists of 396 source line and 162 gate line driving circuits. This chip is capable of connecting directly to an external microprocessor and accepts Serial Peripheral Interface (SPI), 8-bit/9-bit/16-bit/18-bit parallel interface. Display data can be stored in the on-chip display data RAM of 132 x 162 x 18 bits. It can perform display data RAM read/write operation with no external operation clock to minimize power consumption.
Controlling display using Arduino IDE
We will use evive Library to control the TFT display in Arduino IDE. You can download it from here. If you don’t know how to install a library, click here to see the tutorial.
Display Functions
Following are the functions available for use:
Function Description
drawLine(int16_t x0, int16_t y0, int16_t x1, int16_t y1, uint16_t color) Draw a line using two points
drawFastVLine(int16_t x, int16_t y, int16_t h, uint16_t color) Draw a vertical line
drawFastHLine(int16_t x, int16_t y, int16_t w, uint16_t color) Draw a horizontal line
drawRect(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color)
Draw a rectangle using one point coordinate, width and height
fillRect(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color) Draw a filled rectangle using one point coordinate, width and height
fillScreen(uint16_t color) Change screen colour
drawCircle(int16_t x0, int16_t y0, int16_t r, uint16_t color) Draw a circle using center point coordinate and radius of the circle
fillCircle(int16_t x0, int16_t y0, int16_t r, uint16_t color) Draw a filled circle using center point coordinate and radius of the circle
drawTriangle(int16_t x0, int16_t y0, int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint16_t color) Draw a triangle using three points coordinate
fillTriangle(int16_t x0, int16_t y0, int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint16_t color) Draw a filled triangle using three points coordinate
drawRoundRect(int16_t x0, int16_t y0, int16_t w, int16_t h, int16_t radius, uint16_t color) Draw a round rectangle using one point coordinate, width, height and radius
fillRoundRect(int16_t x0, int16_t y0, int16_t w, int16_t h, int16_t radius, uint16_t color) Draw a filled round rectangle using one point coordinate, width, height and radius
drawBitmap(int16_t x, int16_t y, const uint8_t *bitmap, int16_t w, int16_t h, uint16_t color) Draw a Bitmap
drawBitmap(int16_t x, int16_t y, const uint8_t *bitmap, int16_t w, int16_t h, uint16_t color, uint16_t bg) Draw a Bitmap
setCursor(int16_t x, int16_t y) Set cursor to a location
setTextColor(uint16_t c) Set text colour
setTextColor(uint16_t c, uint16_t bg) Set text colour
setTextSize(uint8_t s) Set text size
setTextWrap(boolean w) Set text wrap
setRotation(uint8_t r) Set rotation
int16_t height(void) const; Get height
int16_t width(void) const; Get width
uint8_t getRotation(void) const; Get Rotation
int16_t getCursorX(void) const; Get curser X position
int16_t getCursorY(void) const; Get curser Y position
println(text) Write text
Example

Controlling Display using Scratch
Using the Display Extension blocks you can control the TFT display of evive.
If you want to know more on how to control TFT Display using evive, read this tutorial.