hi welcome to an Arduino step-by-step course by Robojax
in this lecture we're going to learn how we can display the temperature that is measured
with this dht 11 temperature and humidity sensor on this tm1637 modules
we have already studied and learned how we can use this with all the features on the serial
monitor and also we know how to use tm1637 led display now in this lecture we are going
to combine this and see how we can use these two modules with these two different type of
seven segment display and we are going to use to display the temperature on them
this portion of the code is exactly the same as dht 11 without the display
I’ve explained it for the tm1637 I’ve put this start of the setting and I put end of the setting
so this portion everything is for the settings of
tm1637 clock pin aspen 5 and digital in out pin at pin 6 these are constants and then this is a class
we create from this class we create an object an instance of the class we call it display
and it has two parameters the first and the second the first one we pass the clock this
is as if we type five here and data in out and we pass this data in out here as if we type six here
data type this is an array of blank the all of these are hex value of 0 x 0x 0 that's a hex value
with a value 0 0 0 these are for the four digits whenever we need to clear the screen this will be
used and we just call the blank test delay that I’ve used when I run different iteration so two
thousand millisecond is for the test inside the setup we initialize the serial monitor in case you
get some issue with a lc led display so you can debug it from here and then we set the brightness
display does set brightness and 0x0f this is the hexadecimal value to set at the maximum brightness
at the loop initialize the dht 11 as before this is exactly the same this was the code that we just
run when without the display after this here it starts we set display set segment blank so this
is blanking the screen because this is a loop and continuously there will be more information
so the previous values will be declared play dot show number decimal is responsible for sending the
value to the screen to the display and we use get temp with the c this function will get the
temperature in Celsius and then this false means no zero before this and this two means
length of the digits and Celsius this cannot go for above 50 and this this two means the position
for the two digits we start from digit 0 digit 1 digit 2. if we say 2 it will start from this point
and then we have some delay and here we again blank the screen using set segment blank the
blank have been defined in here I mentioned it this is coming here and we are using it
and here we just show uh use the showed number decimal this time we don't mention anything
just say get temp Fahrenheit as you can see this
72 or 82 is the Fahrenheit temperature without all those parameters and now I have set this to
true as you can see with Fahrenheit we are getting also two zeros I’ve said this to start from zero
as you can see the Celsius is starting from zero and here I’ve changed it to one so zero one
it will start from position one and here this is the larger version of the same led display
here is the wiring for dht 11 with tm1637 chip with four digit led display
and this this section the wiring is exactly the same as before for the right pin I’ve connected
it to the ground which have been connected to the ground of Arduino this line of breadboard
have been connected via this red wire to 5 volts this is the clock pin have been connected via
yellow wire to pin 5 and this is the data in out pin I’ve been connected via this orange wire to
pin number six the third pin from the top is the vcc I’ve been connected to five volts
to this line and the last pin is ground I’ve been connected to this line which is
connected to the ground the wiring of dht11 with the larger led display this portion is exactly the
same the wiring however is a little different here that that open and clock is the same piece the
ground and vcc have been swapped so and the vcc or five volt is the lower pin which have been
connected here and the ground have been connected to the ground for the pcb version of dht 11
this portion is exactly the same and the wiring is for the led display is the same
as I just explained for the dht 11 pcb version this portion is exactly the same
the larger led display wiring is the same as I’ve just explained
and here is a demonstration when with the large module we have also a power
led at the bottom which is good now it shows the Fahrenheit 29 and this now it
shows the Celsius in 27 degrees and Fahrenheit 80 with the zeros that I have enabled and let me
now let me apply heat with my heat gun from
now let me apply heat with my master craft heat gun which I bought it from Canadian tire store
and let's see
as you can see the Celsius is 51 and Fahrenheit is 123.
and here is the green version of the same module
and here is the smaller version displaying Fahrenheit and Celsius
this was intro this was how to use the tm1637 with tm1637 led display thanks for watching
now it shows the Celsius in 27 degrees and Fahrenheit 80
with the zeros that I have enabled now let me apply heat with my master craft heat gun
as you can see the Celsius is 51 and Fahrenheit is 123
there's a green version of the same module
here is the smaller version displaying Fahrenheit and Celsius
this was how to use dht 11 with tm1 x37 led display
thanks for watching 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 so you get updates on my upcoming videos