And will come this new lesson, not going to start the coding process for our ISP 32 Telegram connection.
So let's get started by starting the Arduino Ivy.
Now, first, we need to create a new project, so click File New.
Now, once you have a new project, you need to save it.
So let's make find save as.
And we need to save it in another location.
Now, let's save it with yes, be Billy Graham books name now.
The first step in any program is preparing by including the library that we are going to use.
So let's first include.
The adrenal JSON Library.
We also need to include the Universal Telegram Bot Library.
Let's I thought I bring him universal.
Of both but in a fine, and we need to use the Wi-Fi libraries, so I include.
Why find or take?
And the last area that we need to use is the five secure who secured our Wi-Fi connections.
So I find.
Lionel?
The cure that I find, so this part is basically.
Including the required Bibles.
Now, once you are done, we need to start creating the variables that we will use and our problem.
So creating liability related variables.
The first step is creating a constant.
Character points out for this, this I.D., which is the name of our network.
And you need to place.
Your network?
And when I say network, I mean, Wi-Fi network aside.
It.
That kind of thing going stop.
Character password.
And we also need to add our Wi-Fi passwords here.
These two variables are for the Wi-Fi Library.
Now.
We need to create a few variables for the Telegram board.
Now we know that the voters are talking and it requires our I.D. to make sure that it won't receive
messages from anyone but us.
So first, let's define.
Are booked.
Welcome.
And we would add it between two.
I say that regulation and we also need that Shark I.D. and this chart I.D. is basically yours to find
out the top I.D. for individual or a group so that we can make sure that we will be the only one who
is sending messages to this spot.
So define.
Chuck?
I've.
Now, the next step is creating an object from the Wi-Fi client CQ, so I find I want.
Secured this network, Lawrence.
Now we also need to call that boat function from the universal Telegram bots or universal drama box.
But we will pass two variables.
The first one is about.
So can.
Value, so let's change this for this.
The chart idea or our.
Shot it.
So it will take two variables, though.
OK, so now that Chart ID, that's a baby will be used an if statement, but we need to pass on other
variables here to elaborate on that variable is our client.
So.
The clan name based here so that they're on board will take the token value on that day, and from all,
it'll be fine, it work.
And the next step will be.
Assigning a value for the census, so let's create an instance.
Integer for motion sensor.
And we already connected it to Ben, no, let's say let me check here.
And number two, why anyone?
So this 21 year.
And we already assigned the value for the temperature sensor.
I think the value was
34.
OK.
That's it.
These are the Pins pin number.
For motion sensors on this one is the pin number or temperature.
Since.
Now.
We need to create a Boolean variable.
This Boolean value will be used to indicate if a is evicted or not.
So it will return.
True or false?
And will initialize it to a default value of fog's.
It's like initializing a variable of integer to zero.
So in here, right boolean detected.
Equal false.
This one is to indicate.
If the motion is in effect, the.
Now.
Let's go inside the voice.
Well done, like preparing our code now and the next lesson we will code after the function.
So let's talk quick overview of what we have done here so far.
We included the Arduino JSON library.
We included the Universal Telegram Bot Library, the life-I libraries, all Wi-Fi or internet connection.
We created this idea and password variables for the Wi-Fi network.
This is the Wi-Fi network name and this is the password we created two defines.
These are two macros.
The first one is for the bot token value because everybody has its own token.
The second one's for that shot is to make sure that the bot will only receive messages from us from
our user ID.
We created a client which is an object from the Wi-Fi client secure.
We also created or called the bot function that takes two values.
The first one is the bot token and the second one is the Wi-Fi network line.
We created two variables for the sensors Motion Texas.
Since all of English, our sensor, we created the variable to this variable, the motion depicted to
indicate if a motion is detected or not, and give it an initial value of false and that this is Boolean.
And the next lesson, we will program the setup function and place the unnecessary lines of code to
make sure that all your life is connected.
And next, we will program the loop function and setting the motion detection code and the temperature
sensor code.
Thanks for watching this lesson.
This is our stuff from educational engineering team.