Hi! Welcome to esp32 tutorial from Robojax. My name is Ahmad Shamshiri
in this video we are going to learn how to use this ht16 k33 with esp32 to display
integer float point or decimal points something like this negative number
Negative decimal value or clock you can get the datasheet and other files related to this
by clicking the link below the video in the description which will take you
to robojax.com/learn/arduno let's get started with this
this module works with five volts I’ve reviewed the data sheet and full explanation of this in
separate video the link is below the video but for this video we can just say that this is five volts
and the next pin is the ground this is sda pin for I2C communication and the last one is scl
pen for I square c communication
use this ht1633 4 digit 7 segment display with NodeMCU wemos d1 mini
let me explain the wiring the three pins here on the left this is five volts ground and then
sda and scl the five volts have been connected to the pen that have been labeled as five volts
and if you have different esp-32 make sure to find the five volts some of them are labeled as five
some of them have uh five v with the five volts so I have separate video explaining fully the esp32
with the pens you may watch that video so 5 volts have been connected to 5 volts and then
the second pen gray the second wire is connected to the ground here gnd and here sda and scl sda
have been connected to pen 21 here it says g21 and scl black is connected to g22 so there is two pen
between them this is a 3.2 inch tft lcd screen based on esp32 this has built-in wi-fi and
Bluetooth and can be programmed with Arduino ide the product is from Makerfabs and it has built-in
camera you can play simple games you can display text and you can use full features of esp32
I have introduction video for this product the link is below the video in the description
if you want to purchase the product from makerfabs.com the link is also below this video
Now let me explain the code the first thing you need to do is install the library
go to tool manage libraries
Wait for this screen to complete this bar graph type here ht16
k33
and wait for this and as you can see HT16k33 by Rob Tillaart
and this is the one I’ve installed it you will see install button here just click and install
it will work with NodeMCU esp8266 esp32 and Arduino so this library works with everything
and this is the address for the library if you want to download it this line says include the
library and from the class of library we create a an object called segment and we pass the I
square c address and this is 0x70 that's hex value by default this is a value if you want
you can change it for example if you want to use two or three of these I have a separate example
the link is below the video you can change with give different address to each module
and start and stop this is the example for the code this is an array that is used for example
not needed this is we are initializing the serial monitor to display the text if I click on tools
serial monitor that number must match if you go to the bottom on the right side select hundred
fifteen thousand two hundred then you will be able to display the text if you want
segment dot begin initializes the 7 segment display this is setting the I square c address
this is turning the display on segment dot display on this is setting the number of digits
set digits and this is just printing the text this is running test six times test is the code that
runs every segment and different numbers will appear so if you wanted to be quick just make
it one and it will run one time and display off will turn it off because some of the segments that
have been turned on here we must turn them off give it here one second you can make
it very quick 100 millisecond and then turn the display on back and then we turn the column off
initially display column false if you want to display it set it to true, true with lowercase
and inside the loop we set the number of digits to one and then so all the digits are
turned off and then we when we put 64 it will turn it on for us so we give it five seconds to display
64 and then set the digit to 4 and now we set 64. now this 64 with this 64 the difference is
that we will see two digits on the left side when it is displayed because we set it to four
and this line says digit to one again we start from minus 74 give it five second and here when
you display float you see this float with the decimal value and one means one decimal place
so if you do not have more value if we say three then after five we will see two more so total
three decimal place will be displayed even if you don't have value and this is for the negative
value just put negative with a three decimal place this is a four digit with one decimal place
and then we turn it off keep it one second and then turn it on set the digits to two
and then minus one this is displaying display time this is for the time 18 the time it time
18 hours and 25 minutes and then display column and keep it on for three seconds then turn off
the column display column one display column zero and then here it says set digits we set it to one
and this is a for loop that starts from -300 it goes up to 299. every time with a increment of
plus seven starts from minus 300 it goes seven up until it reaches 299 and every time whatever
is this counter will be displayed on the screen give it hundred milliseconds so the loop will
go and then this displays the hex value when you say display hex you put zero here x with
the hexadecimal value to be this rate for three seconds for example we go from uh 15
decremented up to zero and this is the hexadecimal value and also whatever is I from 0 to 15 when you
say brightness I this I can be from 0 to 15 so 0 is turned off from 1 to 15 or different level
of brightness which I’m going to demonstrate it and give it 500 millisecond and here it
says that brightness to 15 which is maximum so this is a full explanation of the code
And here's the demonstration this is a test of all digits and then you can display integers like this
integer with leading zeros and an integer negative integer value
A float point decimal value with multiple decimal places or negative float
Something like this
Or negative decimal point or use it as a clock with colon negative number or counter
Even display hexadecimal value change the brightness you can set the brightness
The code that I will provide you with the library has every possible examples
so you can easily use it with esp32
I’m now working on writing code for to build internet clock for esp32 and NodeMCU d1 mini
this will be published the link is below the video in the description this tutorial we are going to
learn how we can use the lcd screen of 1602 or lcd 204 with esp32 microcontroller Bluetooth wi-fi
unit in this tutorial we are going to control two dc motors using esp32 over wi-fi with l298n
module with Robojax library let's start the motor this is just controlling one motor
Speed up change the direction of rotation and now let's start motor 2
The direction of rotation of motor 2
Direction of rotation of motor 1 and to control it using your mobile device
usb is not connected we are going to learn we are going to measure the temperatures
using this max x75 with k-type thermocouple sensor and esp-32 with Bluetooth touch
and reader temperature in Celsius and Fahrenheit or in kelvin using your mobile device in this
tutorial we are going to see how we can control the position of a servo motor using esp32 using
wi-fi when I press a start it goes from zero to 180 degrees and returns back and this is type one
and type two is from 180 to zero when you press it goes from 180 to zero and return back like this if
I go type one it goes from 90 to 180 degrees this tutorial we're going to learn how we can control
more than one servo motor using esp-32 microcontroller with wi-fi and blue suits module
in this case I’ve connected four servo motors with external power now I’m connecting the five volts
as you can see each can be controlled and they're running