Dear friends welcome to another project video.
In this video we are going to take a first
look at this great new display for Arduino
which uses the ST7789 driver and build a temperature
monitor with it.
Let's start!
I discovered this display on Banggood.com
a few weeks ago and since the price was so
tempting, just $6, I decided to give it a
try.
You can find a link to it in the description
of the video below.
The display is small in size, it is 1.3" but
it offers a great resolution, 240x240 pixels.
The pixels density is very high, so it can
display sharp images and graphics.
If we compare it with the popular 0.96" OLED
display you can see it is slightly bigger
that it, and slightly smaller than the 1.8"
color TFT display we have used many times
in the past.
The display uses the ST7789 driver.
This display was designed to be used in wearable
devices such as smart bands, that's why it
offers such a high resolution and that's why
it is so affordable.
It uses the SPI interface and it is really
fast!
Check this demo out, it is blazing fast.
Let's now see how to connect it with Arduino.
I am using and Arduino Uno today but you can
use any Arduino compatible board.
Since the display uses the SPI interface we
are going to use the hardware SPI pins of
the Arduino Uno.
The first pin is GND and it is connected to
the Arduino GND.
The second pin is VCC and it is connected
to the 3.3V output of the Arduino Uno.
Be extra careful here, if you connect it to
the 5V output you will damage the display.
The next pin SCL goes to digital pin 13, SDA
pin goes to digital pin 11, RES pin goes to
digital pin 8, DC pin goes to digital 7 and
lastly pin BLK stays unconnected.
That's it, the hardware setup is ready, let's
now see the software we need to drive this
display.
One of the best libraries to use with this
display is the ST7789_Fast library developed
by longtime viewer of the channel cmb80amiga.
Please check out his YouTube channel here,
he is doing a great job and he has developed
many great libraries for Arduino.
His ST7789 library is probably the faster
library available for this display so we are
going to it in our projects.
In order to use the library we have to visit
the Github page of the library, and download
it on our computer.
Next we have to unzip it, rename it like this
and copy it in the Arduino libraries folder.
We also need to download the Adafruit GFX
library.
The easiest way to do it is via the Arduino
IDE.
From the menu we select Sketch -> Include
Library -> Manage Libraries.
Then we search for the Adafruit GFX library
and we press Install.
Now we are ready to use the Display.
From the menu we select File -> Examples -> Arduino
Fast ST7789 Library -> Arduino_AdafruitBenchmark.
Now we press Upload button and after a few
seconds the sketch is uploaded to the Arduino
Uno and it is pretty impressive.
Check out how fast it is.
If I am not mistaken it is the fasted display
for Arduino I have used so far.
I am really impressed by the performance of
this display and the library we are using.
Great.
Let’s now build something with this display.
Let’s add a DS18B20 temperature sensor in
order to build a simple temperature monitor.
The sensor has only 3 pins to connect.
The first one is GND so it is connected to
the Arduino GND, the middle pin is VCC which
goes to the Arduino 5V output, and the last
pin is the signal pin and it goes to digital
pin 2 of the Arduino Uno.
You can find the schematic diagram in link
in the description of the video.
That’s it.
Let’s now download the DS18B20 library we
are going to need for this example.
From the menu of the Arduino IDE we select
Sketch -> Include Library -> Manage Libraries.
Then we search for DS18B20 and we download
the DalasTemperature library.
All we have to do now is to upload the sketch
I have developed and the screen now displays
the temperature, and the min and max temperature
values it has recorded.
Can you see that the display it does not flicker
at all when the temperature changes?
That’s because it is a very fast display.
In this example the temperature is displayed
in degrees Celsius but I have also prepared
a version of the code which displays the temperature
in degrees Fahrenheit.
As you can see the code of the project is
pretty straight forward.
The display library uses the functions of
the AdafruitGFX library so it is very easy
to use.
You can find a link to both sketches in a
link in the description of the video.
As I final thought, after working with the
display for a few of days, I highly recommend
it.
It is going to become one of my favorite displays,
because it is very fast, inexpensive and it
offers a great resolution.
What do you think about this display?
Have you used it in the past?
Please share your thoughts in the comments
section below and if you think this video
was useful consider giving it a like.
Thank you very much for watching, I will see
you in the next video!
