0:07
hello everyone welcome to controllers
0:13
in this video I will show you how to
0:16
make a corona display meter for your
0:18
country I am using esp8266 and OLED
0:23
display I will also demonstrate this on
0:27
LCD 16 cross 2 let's start by creating a
0:37
I am using stm32f4 for six r-e but you
0:42
can use any other controller - first
0:49
thing first I am selecting external
0:52
crystal for the clock
0:53
select i2c for connecting the displays
0:57
we need to use the fast mode for OLED
1:00
display LCD display can work in either
1:04
mode next select the UART in
1:07
asynchronous mode and enable the
1:11
interrupt next the clock setup I am
1:20
selecting external crystal which is 8
1:23
megahertz and I want the system to run
1:25
at 100 megahertz also I am changing
1:33
these pins for convenience click Save to
1:36
generate the project this is our main
1:40
file let's see the connections first
1:44
this is how ESP is connected to the
1:47
controller connect rx pin to TX + TX 2
1:52
bar X connect VCC and CH PD to the 5
1:57
volts and ground to ground OLED is
2:02
connected straight forward
2:15
now we need to copy these library files
2:18
you can get them after you download the
2:21
code from the link in the description
2:24
copy the C files in the source directory
2:27
and header files in the include
2:40
now include the functions dot H file and
2:44
SSD one 3:06 dot H file if you are using
2:51
any other i2c you need to update it here
3:01
if you are using any other let's copy
3:04
this function and we will paste it in
3:07
the interrupt file also change the UART
3:16
interrupt handler these are all the
3:19
basic setup we have used in previous
3:21
videos two functions file only have two
3:30
functions this is to initialize the ESP
3:34
you need to enter your Wi-Fi credentials
3:38
here this function is to get the data
3:41
it requires the API key
3:52
to get it go to things be calm and
3:55
create an account after logging into
4:00
your account go to apps thing HTTP new
4:06
thing HTTP give some name to this now we
4:19
have to get data from somewhere go to
4:34
select your country now copy this
4:38
address and paste it in the things speak
4:46
leave everything as it is go back to
4:50
world Dominic a C's click inspect right
5:02
click here copy copy XPath and paste
5:08
string remove the span and click Save
5:21
now let's write the main program
5:24
initialize the OLED display print some
5:30
data to show the status initialize the
5:36
ESP and enter the Wi-Fi credentials
5:48
in the while loop print some info now we
5:52
will get the data papi the API key from
5:58
the things speak and paste it here we
6:05
also need to create some arrays to save
6:16
enter the arrays to their respective
6:18
positions and now we will print this
6:31
this will print the total number of
6:33
cases deaths and recovered cases let's
6:40
build this and flash it into the board
7:15
you can see the data being displayed to
7:21
show that it's working properly I will
7:24
change the country here
7:31
you can see the data is also updated
7:54
let's change it again
8:06
and data is updated again I will change
8:12
this back to my country
8:42
if you are using LCD we need to copy the
8:46
LCD related files into the source and
8:55
include the i2c LCD dot H file now we
9:08
will initialize the LCD print some
9:12
string to display status
9:21
initialize the esp8266
9:36
get data from the server and print it on
9:39
the LCD let's build and run this code
10:17
the data is displaying
10:20
as expected this is it for the video
10:23
guys you can download the code from the
10:26
link in the description be safe and have