Components Required

Image Component Quantity Available in Kit
evive 1
USB A-B Cable 1

Introduction

evive has a TFT display for visual feedback. Visual feedback is very useful for electronics projects and prototyping. They help you to

  • Debug your code
  • Display data
  • Ask for user feedback
  • and sometimes make your project look cool.

evive has a 1.8″ TFT Display with 128 x 160 color pixel. This TFT uses ST7735R TFT driver to display 18-bit color (262,144 shades). Let us see how we can use the TFT display in our projects.

This TFT is already integrated in our evive library. If you haven’t installed evive library visit here to see step-wise guide to install it.

We will learn some basic functions to display text and shapes on the TFT using evive library.

We will start it by initializing it and printing ” Hello World!”

Write Text on Screen

First of all add evive library in your Arduino IDE. evive library is rich in functions for TFT display. To initializing TFT we have to adding tft_init(); function at the start of the program. This function initialises the TFT screen with a black background

To write on TFT, we first have to set the cursor on a place where we have to write. So tft.setCursor (x,y);  where x and y are the coordinates on the screen. The top left corner on the TFT Screen is (1, 1). When you move to right on the screen, x increases, and when you move down, y value increases.

When writing on TFT we have to use tft.print(“Hello World!”); or tft.println(“Hello World”);

 

tft.print(): this function write on the screen and after the text is printed, the cursor will be after the text. For example if you passed tft.print(“Hi”); two times then on the screen you will get HiHi.
tft.println(): this function adds a new line after the text printed on the screen. For example if you passed tft.println(“Hi”); twice, you will get this as output:
Hi
Hi

 

FunctionDescription
setCursor(int16_t x, int16_t y)Set cursor to a location
print(string)Display input string on TFT
println(string)Display input string on TFT and move to next line
tft_init();initialize TFT display
tft.fillScreen(ST7735_BLACK);this filles display with black colour

Example: Hello World!

evive TFT Display: Hello World