in this video we are going to learn how to use this ht1621
six digit lcd display and this we can display numbers you can display certain characters and you
it has also a battery bar easy to use hi welcome to an Arduino step by step course by Robojax
the salt on banggood for around 6.36 cents with different color available so you can purchase
it in green gray blue to a 3.3 cent I’ll provide you the link this is the display very simple we
have few wires actually three wires for data and programming and two wires are for the power ground
and power this can be connected to five volts as you can see we have six digits and we have only
three decimal places three decimal points so you cannot have decimal point here up to three
decimal places you can have one decimal place two or three and the screen quality is very good
this is a thickness and it has backlight
the main chip is located in here so this is the main chip and all the pins are labeled
so you don't need to do anything except load the library and then display the text
this module cannot be used as clock because it does not have the column symbol
and here is the wiring diagram cs pin is connected to pin six right pin is connected to seven data
pin is connected to eight they are in the same order g and d or ground is connected to ground
and vcc is connected to five volts the last pin is not connected in this case
and here is the actual wiring with Arduino blue pin the first line CS is connected to pin 6,
WR pin green is connected to pin seven and then data is yellow it has been connected to pin 8,
GND pin from the last third orange and it is connected to ground and from the last second
vcc, red is connected to five volts here
now let me explain the code first you need to install the library
open your Arduino ide then click on sketch
include library manage libraries wait for this bar graph to complete so you can type
and type here ht1621
wait for the list to refresh
and this is the one by Valerio new hd16 while as you can see it says installed in your case
you will see the install here click install and wait for the bar graph to complete and
then close it if I go on file example scroll down until you see ht1621 you will see these examples
so the one that we are using is this hello world this is a code that I’m just opening
this line this line defines the cs pin and then the right pin and then the data pin
6 7 and 8 and this is a line that is including the library from this class
we create an instance of a library called lcd and then we always refer to that inside the code
this line is using lcd dot begin passing those those three lines
10 is for it says for the backlight but this lcd already has backlight which have not connected it
it says if no backlight is given then use like this so we don't worry about this
and this it's if the backlight is there this will control it and this will clear the screen
this line is just printing the value if I upload this and show you
will see it so this code is printing this on the screen this is just a loop with one millisecond
it just goes continuously so we are getting the millis miller phase a number that when you start
your Arduino it starts with zero let me just start it so you can see it let's start with
zero and every millisecond every second it goes one thousand so we are dividing again by thousand
and then this comma means three decimal place so we are getting the three decimal
place this is millisecond and that's the second 13 14 15 seconds since I started
in this Arduino so in in your case if you want to displace let's say five uh 5.36 something now
because we set three decimal place the three of this will be displayed let me upload it
so three decimal place and as you can see we don't have more one two three not more than
three but if you want to display two decimal places
here this is now two decimal places so this is as simple as that you just put
this line and put your number if you have a temperature or anything you just put it
then we have the battery tester exactly the same way
except here let me upload this code it says set battery level one and we have 500 millisecond
delay and then two three so this will just put one two and three so if you have a battery so
and you can you can put zero to turn it fully off because this is one two three
let me set it to zero now upload it
so now we will have also zero just wait now we will have zero
one two three and then zero all of them will be turned off if you want
kitchen sink now let me upload it the same way from the top sets battery level three so this is
set inside the code and you will have always three all of them are on but then this is the text abc
will be printed and then yy4 so all these texts that you see with these shapes will be printed
dele sync is the delay time that you set here this is one second so one second will be
wait time between each value that is displayed
this is another example trend Celsius so we are defining the same pins except here we
have a function called parenthesis in parenthesis first we clear the
screen it says 0.1 and it shows 0.1 after that 10 comes back 0.1 at the top and then 10.
and here we are using parentheses and we have tried to put six digits because we
cannot print six digits one two three four that's five and six we want to displace
degree and Celsius so two digits is gone now this is saturated to reduce that we can do four of them
now look with four digits
now we can do 111 or we can do 9999
because of the Celsius and that we can show 999
here but if I try one more nine here extra or maybe just one
so this will be added saturated and this should show all 1111
and here if I add one more one it will not be displayed but if I have here
one five here because this will fit and we have one extra this will be saturated and let's see
how it shows
and as you can see this is now saturated and the 5 is not displayed
but if I remove 1 the 5 will be displayed
uploading it
and code is uploaded as you can see 5 is split properly
and if you want to know how much current it consumes
20 milliampere
1920
turn it off let me turn it on and reboot
so same thing 20 milliamperes
if you want to purchase this multimeter the link is below the video in the description
please make sure to subscribe by clicking at the subscribe button in here thank you
thank you for watching tutorial from Robojax if you learned something and found this useful
please thumb up as this will help my video in the search algorithm of YouTube
if you have comment or question please post it at the comment section below I try to answer
and reply and don't forget subscribe to get updates on my upcoming videos. Thank you.