Joy-it RB-TFT1.8 User manual

1.8“ TFT-Display
3

1.8“ TFT Display
Published: 08.11.2018 Copyright by Joy-IT 2
1. Introducon
2. Usage with an Arduino
2.1 Connecng the display
2.2 Installing the library
2.3 Example-Code
3. Usage with a Raspberry Pi
3.1 Connecng the display
3.2 Installing the soware
3.3 Installing the module
3.4 Displaying an image
3.5 Playing a video
4. Informaon and take-back obligaons
5. Support
TABLE OF CONTENTS

1.8“ TFT Display
Published: 08.11.2018 Copyright by Joy-IT 3
Dear customer,
Thank you very much for choosing our product.
In the following we will show you what has to be observed during commissioning and use.
Should you encounter any unexpected problems during use, please feel free to contact us.
2.1 CONNECTING THE DISPLAY
Connect the display to the pins of your Arduino as shown in the following gure and table.
1. INTRODUCTION
2. USAGE WITH AN ARDUINO

1.8“ TFT Display
Published: 08.11.2018 Copyright by Joy-IT 4
2.2 INSTALLING THE LIBRARY
Before you transfer the source code in chapter 2.3 to your Arduino, you must rst add the TFT library. As
shown in Figure 2, click on Sketch → Include library → Manage libraries.
TFT PIN Arduino PIN
VCC 5V
GND GND
SCL 13
SDA 11
RS/DC 9
RES 8
CS 10

1.8“ TFT Display
Published: 08.11.2018 Copyright by Joy-IT 5
In the library manager that opens, search for the library of the same name under the search term TFT and
install it.
You can now select an example code under File → Examples → TFT and try it out, or connue with step 3.

1.8“ TFT Display
Published: 08.11.2018 Copyright by Joy-IT 6
2.3 EXAMPLE-CODE
Below you can nd a code example with which you can display any text on the display. Please copy the
enre code to your Arduino.
#include <TFT.h>
#include <SPI.h>
//PIN-Einstellungen
#define cs 10
#define dc 9
#define rst 8
TFT TFTscreen = TFT(cs, dc, rst);
void setup() {
TFTscreen.begin();
//Hintergrund: Schwarz
TFTscreen.background(0, 0, 0);
//Textfarbe: Weiß
TFTscreen.stroke(255, 255, 255);
}
void loop() {
//Schriftgröße einstellen
TFTscreen.setTextSize(3);
//Text ausgeben
TFTscreen.text("joy-IT", 0, 0);
//Schriftgröße einstellen
TFTscreen.setTextSize(2);
//Text ausgeben
TFTscreen.text("1.8 TFT LCD", 0, 40);
//Schriftgröße einstellen
TFTscreen.setTextSize(1);
//Text ausgeben
TFTscreen.text("ST7735", 0, 60);
delay(250);
}

1.8“ TFT Display
Published: 08.11.2018 Copyright by Joy-IT 7
3.1 CONNECTING THE DISPLAY
Connect the display to the pins of your Raspberry Pis as shown in the following gure and table.
3. USAGE WITH A RASPBERRY PI
TFT PIN Raspberry Pi PIN
VCC PIN 1 (+3.3V)
GND PIN 6 (GND)
SCL PIN 23 (SCLK)
SDA PIN 19 (MOSI)
RS/DC PIN 18
RES PIN 22
CS PIN 24

1.8“ TFT Display
Published: 08.11.2018 Copyright by Joy-IT 8
3.2 INSTALLING THE SOFTWARE
If you are already using a current Raspbian system on your Raspberry, you can skip this step and proceed
to step 2.3 immediately.
Install the current Raspbian Image on your SD card using the "Win32 Disk Imager" program, which you
can download from the following link.
Once the installaon is complete, you can remove the SD card, insert it into your Raspberry Pi and start it.
3.3 INSTALLING THE MODULE
First you have to modify the cong.txt le.
Open a terminal window and open the le with the following command:
Add the following line to the end of the le.
You can save your input with the key combinaon CTRL+X and exit the editor with CTRL+O.
sudo nano /boot/config.txt
dtparam=spi=on

1.8“ TFT Display
Published: 08.11.2018 Copyright by Joy-IT 9
The le cmdline.txt must also be adapted:
Add the following command to the end of the exisng rst line:
Next, the 99-turbo.conf le must be modied:
Change the following line...
sodass sie 0 in 1 ändern. Die Zeile sollte dann wie folgt aussehen:
so that you change 0 to 1. The line should look like this:
Add the following two lines to the le:
Another le must now be created:
Insert the following content:
The value rotate=90 allows in our case the rotaon of the display by 90°.
You can choose between 0, 90, 180 and 270, which corresponds to the respecve degrees.
Now restart your Raspberry Pi with the following command
sudo nano /boot/cmdline.txt
fbcon=map:10
sudo nano /usr/share/X11/xorg.conf.d/99-fbturbo.conf
Option "fbdev" "/dev/fb0"
Option "fbdev" "/dev/fb1"
sudo nano /etc/modules-load.d/fbtft.conf
spi-bcm2835
fbtft_device
sudo nano /etc/modprobe.d/fbtft.conf
options fbtft_device name=sainsmart18 rotate=90
sudo reboot

1.8“ TFT Display
Published: 08.11.2018 Copyright by Joy-IT 10
3.4 DISPLAYING AN IMAGE
In order to display an image on the display, a compable image viewer must rst be installed. You can
install it with the following command:
You can use the following command to download a suitable example image:
The downloaded image can now be displayed with the previously installed image viewer.
3.5 PLAYING A VIDEO
In order to relieve the processor as much as possible during the playback of a movie, it is recommended
to mirror the graphic output (framebuer) by the program cp, so that it can be calculated by the
graphics card unit. Therefore, the program has to be installed rst.
The mirroring can be started with the following command:
You can use the following command to download a suitable example video:
apt-get -y install fbi
wget https://dummyimage.com/100.jpg
sudo fbi -d /dev/fb1 -T 1 -noverbose -a 100.jpg
sudo apt-get install cmake
git clone https://github.com/tasanakorn/rpi-fbcp
cd rpi-fbcp/
mkdir build
cd build/
cmake ..
make
sudo install fbcp /usr/local/bin/fbcp
fbcp &
wget https://archive.org/download/Test_Avi/MVI_0043.avi

1.8“ TFT Display
Published: 08.11.2018 Copyright by Joy-IT 11
You can now play the video with the following command:
The following command can be used to deacvate mirroring again.
omxplayer MVI_0043.avi
killall fbcp

1.8“ TFT Display
Published: 08.11.2018 Copyright by Joy-IT 12
Symbol on electrical and electronic equipment
This crossed-out dustbin means that electrical and electronic equipment does not belong in the
household waste. You must return the old appliances to a collecon point. Before handing over waste
baeries and accumulators that are not enclosed by waste equipment must be separated from it.
Return opons
As an end user, you can return your old appliance (which essenally fulls the same funcon as the new
appliance purchased from us) free of charge for disposal when you purchase a new appliance. Small
appliances with no external dimensions greater than 25 cm can be returned in normal household
quanes independently of the purchase of a new appliance.
Possibility of return at our company locaon during opening hours
Simac GmbH, Pascalstr. 8, D-47506 Neukirchen-Vluyn
Possibility of return near you
We will send you a parcel stamp with which you can return the device to us free of charge. Please contact
us by e-mail at Service@joy-it.net or by telephone.
Informaon on packaging
If you do not have suitable packaging material or do not wish to use your own, please contact us and we
will send you suitable packaging.
4. INFORMATION AND TAKE-BACK OBLIGATIONS

1.8“ TFT Display
Published: 08.11.2018 Copyright by Joy-IT 13
We are also there for you aer the purchase. If you sll have quesons or problems, we are also available
by e-mail, telephone and cket support system.
E-Mail: service@joy-it.net
Ticket-System: hp://support.joy-it.net
Phone: +49 (0)2845 98469 – 66 (9:00 - 17:30 o‘clock)
For further informaon please visit our website:
www.joy-it.net
5. SUPPORT
Table of contents
Other Joy-it Monitor manuals

Joy-it
Joy-it LCD 128X64 User manual

Joy-it
Joy-it VIEW 15 User manual

Joy-it
Joy-it RB-LCD7-3 User manual

Joy-it
Joy-it RB-TFT3.2 User manual

Joy-it
Joy-it 84X48 LCD DISPLAY User manual

Joy-it
Joy-it RB-LCD10-2 User manual

Joy-it
Joy-it RB-LCD5 User manual

Joy-it
Joy-it RB-LCD-16x2 User manual

Joy-it
Joy-it RB-TFT3.5 User manual

Joy-it
Joy-it RB-LCD-10B User manual