[go: up one dir, main page]

0% found this document useful (0 votes)
73 views202 pages

Arduino For SCADA Systems A Step-By-Step - Sanji Nakamoto

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
73 views202 pages

Arduino For SCADA Systems A Step-By-Step - Sanji Nakamoto

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 202

ARDUINO FOR SCADA

SYSTEMS
A Step-by-Step Guide to Interfacing with
Industrial Control Systems, Building Real-time
Cryptocurrency Price Displays with Arduino
ESP32 and ESP8266

BY
Sanji Nakamoto

OceanofPDF.com
TABLE OF CONTENTS
WHAT YOU BRING ALONG 5
DOWNLOAD CODE SNIPPETS 7
WIRING 8
FIRST GRAPHICS TEST 10
SHOW XBM FILES 14
FETCH DATA 19
MORE CRYPTOS 27
CAT FACTS - DISPLAY TEXT IN MULTIPLE LINES 30
CAROUSEL 36
RELOAD DATA 43
CURRENCIES 48
API - TIME AND DATE 51
ADAPT TO ESP8266 59
SUGGESTION FOR A 3D PRINTED CASE 66
ASSEMBLY 68
CREATING FIRST SCADA PROJECT 69
FUNCTIONS AND ALARMS 73
SCADA SYSTEM USING ARDUINO WITH FREE SCADA SOFTWARE 80
HARDWARE AND SOFTWARE REQUIREMENTS 82
ARDUINO BOARD 83
CIRCUIT CONNECTION 87
MODBUS RTU 91
DOWNLOAD AND INSTALL ARDUINO IDE 96
ADDING MODBUS SUPPORT TO ARDUINO IDE 101
PROGRAMMING ARDUINO MAIN FUNCTION 104
PROGRAMMING ARDUINO LOOP FUNCTION 110
DOWNLOAD SCADA SOFTWARE 118
INSTALLING SCADA SOFTWARE 122
STARTING A NEW PROJECT IN SCADA SOFTWARE 125
USER INTERFACE AND COMMUNICATION DRIVER 127
TAGS IN SCADA SYSTEMS 131
PRACTICAL IMPLEMENTATION 137
ADDING TAGS TO DATABASE 143
VERIFYING OUR PROJECT AND LINKING SERVICES 149
CREATING AND CONFIGURING YOUR FIRST SCADA INTERFACE 151
HOW TO DOWNLOAD AND INSTALL WPLSOFT 156
PLC PROGRAM TO BE CONTROLLED BY SCADA 160
PLC PRACTICAL INTRODUCTION 165
SCADA PRACTICAL IMPLEMENTATION 169
INTRODUCTION SCOPE OF LEARNING 171
FIRST STEPS WITH AN ARDUINO 173
INTRODUCTION TO ELECTRICITY AND DIGITAL ELECTRONICS 178
IMPORTANT COMPONENTS OF ELECTRONICS & DIGITAL ELECTRONICS 183
THE ARDUINO BOARD (HARDWARE) 195
THE ARDUINO SOFTWARE (IDE) & PROGRAMMING BASICS 198
PROJECT 1 A FLASHING LED AND AN SOS SIGNAL 217
PROJECT 2 TEMPERATURE BASED LED LIGHT 221
PROJECT 3 LIGHT-DEPENDENT CONTROL OF A MOTOR (BLIND MOTOR) 226
PROJECT 4 GAS DETECTION ALARM 229
PROJECT 5 PASSWORD PROTECTED MECHANICAL SYSTEM 232
PROJECT 6 REMOTE CONTROLLED UNLOCKING MECHANISM 237

OceanofPDF.com
WHAT YOU BRING
ALONG
First of all, I assume that you have basic knowledge and programming that
means that you know what is done for Loop so that you can set up an if
statement, it said. So this is not a programming course. It's more that we are
really creating something. I explain the code snippets in detail of what it's
used for. But when you want more background information, how do HDB
Klein, for example, work in detail? Then you have to dig a little bit deeper
into the theoretical knowledge of this topic. The next point is that I also
make the assumption that you have set up what you already knew.
So that means that you know how to select the proper Arduino boards and
also selecting the port and also that you know how to download the
libraries. I always give you a reference. Please download this or that library
and so that you know how you can find it and also download and install the
libraries. Nevertheless, you can always download my codes. It's very at the
very first beginning on each radio when we are developing the codes. I will
show you the name of my sketch and you can download each chapter, each
sketch, so that you can follow me along with the coding process. But also at
the very end you get the whole SB 32 development sketch, but also for USP
80 to 66.

OceanofPDF.com
WIRING
Let us start with the worrying part, as you can see, and as I mentioned
before, the introduction, we have now due to opportunities. One was
episode two and one was 82-66. I have both of them in the mini version.
But you also can develop when kids grow to bigger ones from a size. So I'm
also using an old and small display zero point nine six from the size inch
big. And yeah, of course, that hovering part is not really rocket science. As
you can see, there are four viruses to the only display we have here, and
eight two six two six five fold pins go to the VXI to the display in the
ground, to the ground, to the original. And the D1 pin is connected to the S
C L pin from the older display and S.T.A.R. to the D two. You can find this
schematics on the pin out from the D one Mini, so we have nothing to do.
Only connecting these four wires and then powered, we're powering with
the USB connection. And that's all we have to do. Also with the USB 3.2,
it's nearly similar to this issue and Grant is obviously.
And then we also have to pawn two pins, the Io twenty two, I think, and
twenty one and you are so connected you can find the proper pins on a pin.
And as I have you and I would say, let's switch to the tabletop and then
we're trying to connect the USB to. Here is my small old display, and for
the part and on the ends, I also have A. one M.. 82 66. But now let us focus
on the speed search two on my pin out I can see on the inner side of the
spear. Here's the reset button. We have fewer there. E to see him and Seattle
and to see a pin, so we're taking this for the clock and for the regime data,
twenty two for the clock, twenty one for receiving data, I've connected here
to small wires. So the first one, the brown cable goes, this is the which you
see. It goes through the sea to the. To the display, then the black one is the
ground. Then the third one is my. ACL CEO goes to twenty to twenty two, I
have to take a lo Is this one on the first side? And then we have the last one.
Estate is 21. So as you can see. Really simple schematic. And that's all we
have to do. And afterwards, our power, the you, the Arduino with its micro
USB, and this is all what we have to do for the wiring part.

OceanofPDF.com
FIRST GRAPHICS TEST
Now we want to make an example and references were two examples from
the libraries. Therefore, I opened a new sketch and now we are
downloading the necessary library. Therefore, we go to sketch and we are
going to include library ménage libraries. Let's take a little while. Because
this open window is very, very slow. But when it has loaded, we have 80 in
you. You see, it's very, very slow. I was typing. Then we are searching. Hit
enter.

And here's the desired library you ate too. And by Oliver, this is what we
want. Click on install. Maybe you have also installed some more referenced
libraries. So just click And then when you have installed the whole library,
there should be an undergrad file example. When you. Go a little bit down
in the menu, then you should have a new and trim you eight h two. Then we
go to the full buffer. And also we go to graphic artists to file examples. You
hate to flip off a graphic artist. A new sketch is opened, and what you now
can see is that we only need one library, this library and this library is the
only library we would use for making the whole graphic, the whole bitmap
and string showing on the display? So it's growing a little bit down and then
we see a lot of constructions to start the right and proper only display. I'm
using one 28s multiply. 64. I have to search to white one. So here we have
the proper one.

It's cards known M A, C e to see him, and then we are switching gears. The
clock was twenty two, I think, yes, 20 to him and where the data was
twenty one. And this is our constructor. And that's it, that's all what we have
to set up for the first graphic artists, and when I scroll a little bit down, you
can see here a lot of the constructors, yeah, a lot of function, which we are
using afterwards in our project, for example, how you can draw a frame,
how you're making disc circles and other frame, how you use a string.
That's of course what we are using. You can also make the direction, change
the direction, the line thickness. You can draw triangles. What's that ASCII
symbols? Also, using X-ray pages, then you can use also and that's what
you are, of course, using some bitmap files or in this case, it's expenses for
showing some drawings.

And also, we can overlay drawing and text. This is also what we are using
later bitmap overlay, of course, scoring a little bit more down so that he gets
to know what's there. OK, and that's the drawing function. Let us compile
the first graphic tests and connect our. Just be sorted through to the
computer. While the host country is compiling. Switching back. Don't
forget to. Set up to ride the rides boards, I'm using to search too. And also,
don't forget to use the prop comports. So the comparison was successful,
and then I'm uploading the sketch to my ECP search tool. It's finished
uploading, I'm resetting it. To the tabletop, and now what we see is the
graphic test. So we see different lines, we see triangles and also some texts.
How many rows you can display, some unique codes. And this is what we
are, of course using is the pigment overlay. So with some expanded photos,
you can also animate the whole thing. And then it started all over again. So
when you can see this test example, you have white everything in the right
way and we're ready to go and make some code for ourselves.

OceanofPDF.com
SHOW XBM FILES
This project we are going to convert cheap to expensive so that we've got
the structure. And we want to display it on our old display. First of all, I
created a new sketch and also a new photo. And in this folder I've also
implemented inserting a new file. It's called my old age. And when you
open the main file, also distort, each file will be opened. And in this my old
age, I'm pasting all the graphic data insights and in the main data in the
main exam and saying data I make can include statements with my all on
the edge. And as the name says, we include the WHO code inside this file.
So this gives us some way to structure the whole code a little bit more in the
proper way. This is to host coach Justin Silver begin and then delay. That's
all. So the first thing we are going to do now is open a graphic program
where you can edit some pixel graphics and I'm as I made in your document
with 50, with 50 in the higher. And now you can insert any kind of pixel
graphic as you want. I use bitcoin being in and.
Be aware of the contrast in the foreground and in the background, because
our display is very simple, and so I only have one color display. I think
there are also two color displays in this size, but here I only use a black
foreground and in white background safety two in JPEG. And then we are
open. For example, this online convert image converted or cheap, cheap to
expand, it's becoming very real at the end of 2021, but any other convert
will do it the same, then trick and drop the chip. Click on Convert and I
think it's already downloaded and you got here on file. So I'm not using it to
expand files. I click on Edit with no bid, for example, and there is what we
want. We copy. The defiant switched back to our Arduino and. Paced the
whole information from the new local insights to my older age, but I'm now
doing as I'm hoping to.
The first thing is that we need a concert unsigned Char, and we are calling
this an PTZ and also the Brookman is important to use. So always use this
structure that we got with to espouse. So due to no errors when you are
displaying this kind of information or this kind of graphics. So this was the
first step converting the JPEG to an experiment, including into a separate
file. Now we're switching back to our main file and we are starting with
including our library u et je to dot h. And also the constructor that we used
in the graphic tests just copy and paste to construct a line. And that's it for
the whole part, which was the library. And then we are starting to. In the in
the set up with our approach to showing, it's at the expense, first of all, we
are making a begin of collaboration and then we are clearing out all of the
existing content on it with clear buffer and then we are sitting in front
because the first thing what we all want to do is now we want to write
something on the display. We are setting the bits mode, the bitmap mode on
false. That means that we have a transparent background so that we can also
make an overlay of this when we already have so. This one I've used from
the example, from the graphic tests, and now we are once we are one to do
some strings, you eighty two point two raw. SDR and then we are setting up
to expand the way access to exclusive 128 pixels in my case and the y axis
have 64 pixels, so I'm using thirty five to thirty am kind of in the middle of
the display.
And then I want to show unloading text, but it's not very easy because we
have to convert this one to a string and then give them in character, so we
have to convert it to an C string. So then the last part, the last point to show
it on the display is sent a buffer with this statement. We are actually
converting all these statements before sending them to the display. Then
we're making a delay because we are in the testing phase from maybe two
or three seconds and now we are clearing the whole. Disappear once again,
because now we want to display our new generated BTC file. Therefore,
we're switching back and now we are using you to point to the raw extreme.
X x y x is then the size of the image, I have set it up to a 50 to 50. And the
name of the. Of the file and this is called Pizzey. Then. So last month we
sent it a buffer loop. Nothing to do for me, because this is just the first test,
if we have it converted in the right way, then take a look in the compiler. If
we misspelled something that looks good, then use be connected. Upload
the sketch. Then we're switching to camera. There we go, we have our
loading statement. And now the generated extreme fund is showing once
again, I'm. Restarts, the new here is the loading. And then the bitcoin is
showing up, and we defined it to certain six and five on the y axis. And as
you can see, it's that simple to show a bitmap Pfizer face on an old display
with our library.

OceanofPDF.com
FETCH DATA
Let us start with connecting to the wifey. And first of all, I've created a new
folder and this folder is called to fetch data. And now you can see it in new
files. It's called my credentials. And as the name says, there are my
credentials for that. We are wifey and also my wife. Therefore, we're also
entering each document, and in this document, we will connect to the
access point and also make it to the court for fetching the whole data from
the API. So open up the main data and also you should have the same
structure and these three Dot H documents should be opened. First of all,
we include at the very first beginning, the new documents so that we have
no problems afterwards. My career then shows and also my wife. So let us
switch to my wife. Oh, just as an information, I also included. No, I didn't
include it, I have to include more of the logos, but this we will do
afterwards. First of all, we are switching back to my wife's team, so. What
are you doing now? We have to include some new libraries for the wife in
connection. We need wife dot h. H to be clients that h wifey clients secured
that H and Arduino Chasen Dot H go to the sketch and to include library
managed libraries and download all of these for libraries. So if you have
downloaded it, then we could start with the first one, and it's called, in my
case, connect to a that means access point to your router or your connection
to the WiFi. And then we start with WiFi, begin with this ID and password
and the society and the password is stored into my credentials and tests.
This very I was my idea and the password is the same. It's called password.
And my hidden passwords, so.
Just did you get to know how the structure is from this variable? Then we
have to wait a while. Just as simple, for starters, when it's not connected and
stays in there, we're making a delay of one second. And while the
connection is established, we are printing out connected to WiFi or
connecting to WiFi. And if the connection is successfully established, we're
printing the local IP address to their sewer monitor. So. Therefore, I would
say that's a start. Going back to the main file, switching to the set up. And.
It's the beginning, I would say we're making a connection, not we're making
a little bit later the connection, just print the loading file and also the
switching back to local here and making the connection to the.
Pete? I'm commenting because I only want to see the loading. Then we
press the compiler, see if we have some errors inside our codes. Looks
good, then upload the sketch. Sketches uploading, I'm. Showing the next
few so we have here, the loading opened the ceremony door connecting to
WiFi and we are connected because when we got the IP address. Switching
back then, we are connected, so this was successfully successful, and now
we are going to try to make an API call. Therefore, we are making a new
one. And you function and in this function, we are creating an HTTP client
object and with the variable HTP. Nevertheless, it's an HD PBS, but. That
doesn't matter, Typekit slash begins. And inside this begin is my rural soul
and into charted it because it is hard, it gets there. We got and stopped
escorts. So 200 is successfully 400 is not found and will be making a false
call and so on and so on because the 200 is. I want to know if it was
successful so I will print it. Printouts to start this could make a small delay,
and as the next one, we are creating and static chastened documents.
Therefore, I recommend reading and also visiting this site from Jason.
Therefore, there is an assistant that you can also paste in you. You chase an
object the whole format, and then you will get the whole structure. And also
the line of is what you need. I've already done that, so I insert a static chase
document with this kind of buffer. And also his variable name is a duck.
Then I'm creating a new string. It's called payload, and then I'm passing the
string, which is stored in the HTP variable. Then I'm making a char Jason
and therefore reference to pay loads and loads loads see that have to be and
and charged on nothing string. And as the next one, I make the DC
realization that also gets from the assistance we're passing to docs document
with the buffer and that just created chasten and variable.

And then we can do, for example, we're seeing later on because now I
would like to focus on the CoinGecko API, so let's open a new browser.
Then CoinGecko API. Let's have a lot of exploring the docks. And
CoinGecko has a really great API because you don't need to look in or you
don't need all the skills. You just can use it. And there are, of course, some
limits, I think, 20 requests per minute or so. But it's free to use and it's very
simple to use. So I'm going to use the simple price, click and try it out, and
then I have a few parameters of what I can use. First of all, I would like to
use string ideas. I use bitcoin. I'm using oil. Or you can use USD. I think for
dollars, I'm using the oil, and I'm also including the last updated ads. So that
means I'm also getting a timestamp when the server was generated. I'm not
generating the last bitcoin data because when you're fetching the data and
when it was generated from the server to different sinks and later on, I
would like to display one. It's generated because often they also have an
error on the sofa or there is a little leak from a few minutes. So then we
have an accuracy and re actual timestamp. So then we're going to execute it.
And this is our Jason Response body with the code 200. I am copying the
request you requested. Make a new protocol, and this is our Chasten
document or object, which I would like to have and then in my Arduino. So
Bitcoin euro the price and last updated when I'm switching back and
changing year USD. Then we have you. Also used here, we also can change
here, use the comma. I think a common euro, but straight out, of course,
then we have both of them. So this is the first example. We're just using the
US deal and copying them, switching back to our Arduino. And going back
to the euro.Pasting here to you from CoinGecko. That's that. And now that
we know how the structure is just switching one more big. With bitcoin and
then USD Bitcoin and then used to. Now we are making a local variable
around PTC Euro. Bitcoin is the structure of the first one and I'm using it as
the second one for the price? And then we are printing out our data. But we
have to convert it to a string. PTC euro, but not the euro making zero steer.
And it's. So long, so cook, let me see, are. Good. We have to make not
lower case the H-2B gets. Then let's compile. Let's see if we have made
some more errors. Looks good. So I'm uploading this catch. No. We are not
finished. That was true, of course, in the main data we have connected to
AP and encrypted data, so the text is showing on the display. We are
connecting to WiFi and then getting CoinGecko data. OK, I'm switching
also on the. The tabletop camera and then open the ceremony because we
only get the data on the ceremony on this project. So. I'm a little bit excited
to connect to his wife, and we're connected. And here we go. Start 200. That
means we have, you know, we are getting back our chasing document used
bitcoin price in USD. And we are showing the loading string on the display.
This is all what we want to achieve in this project. So once again, recap we
are connected to the wifey functional group to date through and through and
function. We're making you with the H-2B client library to call. Also with
us and then we send static chasing documents. We are fetching the data and
now we have the data stored in a local variable. That's it for this project.

OceanofPDF.com
MORE CRYPTOS
In this project, we're adapting to CoinGecko API so that we fetch more
cryptos and descriptors. We are going to try to display on the alert with an
ensemble and also list current prices. So let's start with adapting
CoinGecko. You are therefore switching back to the CoinGecko side. And
what I'm now adapting is the ideas. We are also making Ethereum and
Dogecoin into the ideas comma separated without any space euros and
USD, and also to include last updated is true click and execute and then we
can see the new Jason three objects with you were used to and last updated
elements, each of them. Looks very good to me. We are copying the request
you are switching back to the Arduino and replacing the euro with. The new
one, this was the first step and the next step we can see here that we have
started the Bitcoin USD price in a local variable. That's not good for our
next purpose. Therefore, we are going to the top of my wife's team and
making some progress. That means that we have access to these variables
outside the function. Bitcoin used to, Ethereum used to and also used steam.
And we are making the same this year because maybe you want to also
visualize the euro's. And Long and Deutsch Euros, but not. So then going
back to our group to date on Ether, I'm used to DOC. Um. Let me throw it
on, I misspelled it. USDA and the same with Dutch. I'm not sure. Greetings
to Mr. Elon Musk.Dogecoin, you, Steve. And we are printing out. Coins
loaded, so far, so good, we just adopted the new rule, making some. Global
variables go back to our main data and therefore we're making some quick
and dirty. Visualization just for debugging purposes.
So I'm making a small delay here, and then we are going to the loop. First
of all, we are setting up some global awesome local barriers as interchange
for our visualization epsilon starting point soon. And then we start with
clearing the buffer and then we are throwing our first expen file. It's called
or it's on the exposition zero y five. It's for the size 550 and as we did
before. It's in my wallet. It's called BTC. Then we're setting the funds. It's in
smaller funds. And now we can draw on string a G to dot drawstring. We
are sitting in the very X and Y, and then we are posting the BTC USD price.
But as we did before, we have to convert it to a string because now it's long
and not a string. We cannot pass the string. It's needed as a character. Then
we have to send it. To send Buffon and for testing purposes, we made him
delay from 2000. That means two seconds out of a match. Just give a lo
If we have compiled everything right? And then, as I said, for testing
purposes, the next one item, I've already converted a picture from
Ethereum. And then I sat in each, huh? And the third one was two seconds.
DeLay Dutch. If I called it Dutch. Let's see. Kate Snow, BTC, Dutch. OK,
so and then also centered around making Italy, what we've done here is just
visualizing the data, the information we're making. We don't make any new
requests. So this is just visualization. We are fetching the data in the first set
up and then we are only making this stuff. OK? Composer says there are no
errors. Let us upload the file. Turning on the other camera, and it's also
interesting, though, is this ceremony time switching on the ceremony time
then connecting to WiFi? Coins are loaded. And now we are seeing
Ethereum. Bitcoin.Dogecoin.Very nice. So in our loop, we are displaying
no. And XM and be fine and also and string this the current oh, there are
those colonies with the price of Ethereum. Here's the mistake: Dogecoin.
And then we also have an incorrect dot com price because it should be
somewhere, you know, 20 cents, I think. OK, so this was the first test if you
can fetch data from the API and also visualize it and make an overlay from
S&P and a string file.

OceanofPDF.com
CAT FACTS - DISPLAY
TEXT IN MULTIPLE LINES
Before we start with this project, we have to make a minor change on the
variable declaration of touch because as we've seen before, there is just a
zero by touch. And this is because I've declared it as a long, but Dogecoin is
at the end of 2021, somewhere between 20 cents, and therefore we have to
declare it and float so that we get to also come on because of BTC and
Ether. I'm not interested in the cosmos because it's priced at sixty thousand
or fifty thousand seats for me, not out of interest to see you as decent or
your sense. So this was to change. But now we want to make Ancoats
where we have a long string and we want to cut the strings so that it fits
perfectly into the six rules, which we have placed on the display. And
therefore we're switching to the simulator and I'm using the book Be In.
Because then we can check our main algorithm a little bit often and don't
have to waste time compiling.
First of all, I am declaring some. Some terrorists, I have six rows of space
in my display, so six strings and we are passing these six strings to an array
and then going to copy an example string. I could get a normal temperature
virus around 101 degrees Fahrenheit. Very good to know. String cat facts
are. Chuck. So first of all, Syria begins. Then. Let us think, what can we
do? I want to know an algorithm that gives me a maximum of 15 or 12
characters. So first of all, I have to find each. I would say. A space for each
next word. This is very simple. I have a helper function here, next words so
searching for on white space and making a substring out of it. So it returns
me the next word from in-stream. Let's give it a trial. Sarah, print line next
word conflicts. Then starting to simulate and I will return in if I delete the
first word. Click Assimilate, simulate, I will get back cats. Mixed delete and
I would get back to normal. So the first thing I already implemented is a
small function, which always gives me the next word, often a string because
now I want to check something inside rule one. Give me the length of the
row. One input. Plus the next word length. And then I know, Aha, OK, I can
put everything in row one. And if the character size is more than 15
characters, then going to the next rule and so on and so on. Therefore, we
have to check. Road. Now, let us begin with and with Follow-Up Integer is
into John Snow. The Super six and increment it by one with six rows. So
greater or smaller than six? OK, now I want to check if. Row, one or row?
Length Blues. And plus, the next words from kit facts. The lengths should
be smaller than 15 characters. And if we have that, we can put it into the
road one, if it's greater than 15, then go to the next rule. So simple if
condition, but with an if condition, we can't go spring to the next room. So
we are using an air conditioner, so do it for a long time. The condition is
true. And therefore, I say I wrote in this room, and we are making space and
also adding the next word from convicts. So our main algorithm goes
through the years through each row and we are adding text as long as the
length from the row. Plus the next word is under 15 characters and then
going to the next and the next until all rows of four. And you know, we are
only getting 72 characters, so it should always have a place for six rows.
But we are not finished because now we are always dealing with the same
string. But as we meet in the first example, the next words we have to cut
out are the words which we already have in the rows. Therefore, we are
manipulating the original conflict string. Therefore, we're making a
substring that could fix both substrings. We are saying the next word. Could
for length plus one, because always cutting the next white space. Owned
facts. Links because we want to.
We are cutting the first throat plus the whitespace, and the second one is the
whole length from the string. So. But I have misspoke. This looks a little bit
too much, I think, one too much. Let's give it a try. Huh? So. Next words.
Lang, snip. Running to error to error. So now. Then give it a try and print it
out, we make an extra loop. So now we're printing out the road. Let's give it
a try. And we got a cat's normal temperature varies around 100 degrees
Fahrenheit, and dare we only get one row with a maximum of 15 character
size? Let's try it out with some others. With another example. Making a new
acorn. Another one a little bit longer. Sitting in the new string. Simulate cats
have been domesticated for half as long as dogs have been. And you see,
our small algorithm works very well, and now we are going to implement it
into our main program. So switching back to. The multiple rows, therefore,
we are here at the very end where we set the string. First of all, we have to
declare the global variables. Therefore, we have a stream and a rule. So
long, so good, then we're going down. And making some quick and dirty.
We can do the implementation. We are going to copy the thing from our.
Previous example. Our next words function is also not implemented. We're
going a little bit up to implement. Next, brought before to set up. So going
down to the main. And now here is our. General Loop. But before we have
to save the kid, fix it. It's already implemented, we have to get facts, now
we have to make the second loop for the printing arts. And therefore. So
therefore, I have a second look at making a normal string with 38 on the X
on and on the Y axis, I made the year multiplied by 10. So that means I
have six rows beginning at 10, 20 and so on and so on, and then printing out
as before the first row is correct on the second episode and so on and so on.
Then let us compile the sketch. So it looks good to me. I've changed the last
delay to 10 seconds so that we can see a little bit longer. Our new cat facts.
So let's take a lot of Connected coins loaded with and start to 200 tickets is
six times better with the Ethereum Dogecoin. Now we see the correct
Dogecoin price and. Amidst the first delay I could see six times, very nice,
very, very nice. So you've seen we have not implemented a small algorithm
to cut the text into six rows and in the next step, we want to make a little bit
of the loop, a little bit more structured and also load data in a few seconds.

OceanofPDF.com
CAROUSEL
In this project, we are going to implement its own coastal function, that
means we are looping through our images and showing the data on the
display. Therefore, I also created a new folder six concept and we're starting
at the very beginning of our mandate by declaration, our global variables,
what we need for this example. And the first example of the first global ever
will be expanded images and you notice variable declaration. I switched to
my wallet and you see it has the same structure, Constantine shown. So that
means in this area, we reference the name of our images. Look, so you see
your stance, BTC, FDI in the same, the same names as we are to accelerate
it here so that we can afterwards make a loop and access to images by this
global variable and true later purpose. You know, we always need a global
interchange count with initialization and with zero. Then jumping into the
loop, I uncommon or commented everything out because now we want to
create and function and function. It's called in.
And it takes an integer recipient in which no one will use the X and Y, and
we're clearing the buffer and also drawing the image, but we are not a
reference to a variable name to the image. We are now using ESPN images.
That's the array which is created at the very beginning and will reference
the image no variable. So. In the loop. So that you can get an overview of
what I want to do now is considered. We are calling to function cancer with
the very able codes we are nationalizing currently with Syria. And then
we're in each loop. We increment the count with one and we make him
delay. For example, 10 seconds. So going back to the Kyoto function.
And this simple function will call the council it will reference Sarah
Indexers Bitcoin Index one is Ethereum and so on and so on. So. So long,
so good in the council function now we are throwing the images, but we
also want to add some text as we did before, so I recommend switching the
case. We are asking the image No. When the image, no, it is the case zero,
then we have bitcoin, so. Let's start. Get this big bitcoin euro. Bitcoin used
to fund, and we're sending it to the buffer. Sent off if it is case one.
We are referring to Ethereum. It, huh. Soon, next, one case to touch. It's a
touchscreen, it's a touch. That she was due. Case three is a little bit
different. Just make it all to four months for Case three. We are sitting at the
very first beginning and then. Going to copy the whole thing. We're taking
this also. Going back to our case, three. And for four months, so what we
have to follow is the same, the printing line is also the same. And the buffer,
I will delete the buffer from each case because this is in a more general way.
Can do it in the river. So let me see, we set the funds, we are making the
whole variable. The substring, it's that we are printing and storing. So this
one isn't needed any more. I would say we're making it a break. And we
have a last case just for training purposes. We are making a show. For
example, with you, the main domain, and that's it, that's our.
Our whole switch case statement at the end of the case, let me see, is that
this one we have to buffer at some point. Let me go through the crowd to
one small at the very first beginning, depending on the image number,
which we are calling the loop. We will reference the image afterwards. We
are going to the switch case. And we are on the say that the index Syria is
the bitcoin ether in Dutch, the case is kept facts and case for is a lot to
mean, for example. So. Let's check the compiler if everything is set up
correctly and then we will. Uh. One thing is missing because when we have
in the loop only these three rows, we are counting one two three four five
and now we have a problem because we only have four. So we only have
one when I go up. How many images? One, two, three four, five five
images. So and also an. Counts. Before that declaration, I've missed
something. Let me see what they've missed here. And said, Chas, and also
going down to the loop. That looks good, but I was on. Reset codes that
were missing, so if can't be greater than four. Count isn't zero. So it begins.
It's zero and loops through one two three four five. It's back to zero. Let's
check in again. And I've misspelled my own function and. Concerned.
Uploading the sketch switched to camera, and now we have the same.
The same logic, clean implementation, but otherwise it's more in an abstract
way. So let us see, at the very first beginning, we have to set the bitcoin
price. Ethereum, the Dutch, etc. But what we now can add is. Because we
have now not changed the new fetching data, so that means, first of all,
before we make the next loop, we have to make a new helper function that
is called let me see empty code thickets because we have six rows and six
rows filled at the very first beginning. And at the second loop, we have two,
I would say, delete all the content from these rows. So therefore I make four
and say the row is empty, then switch you back to the loop function and in
the loop when we are done with, the first is the first reliance. We are empty.
Typekit fact we are fetching decrypted data as we did in the setup and we
are fetching the data and. So with this logically implemented each loop. We
get one, two, three, four. It's the fifth round we're setting the countdown to
zero. Getting the new data into new data should show up on the display. So
uploading the data? Switch the camera back, or I would say we are taking
the other camera, because then we can also see the ceremony too. So
therefore, we in the loading, we are fetching the data for the first time it's in
the set up coins are loaded. Kids have sort of nor on stocks of about 60. So
with the conversion, with talks, with the bitcoin volume, then after 10
seconds, the ether on Ethereum, well, you have shown up. Then the Dutch
client price. And now a cette fact should be shown. I hope it is nice, nicely
formatted. Yes. Nice. In each row, 15 characters, then a logo should be
presented with your domain, for example. And as a last step. We should see
if, you know, of course, coins are loaded because we are in the next round
and also a new cat effect. Nicely done. We have now implemented the
colossal and we can update our crypto and catch data dynamically.

OceanofPDF.com
RELOAD DATA
I'm sure that you're familiar with the concept of blinking without delays. So
in a general speaking, the delays are not really good for your program's
structure in court because when you see delays, the whole program stands
still until the delay time is over. That means you input, for example, a five
delay of five seconds of delay. The program stands still one second to three
four five and then executes the rest. When we are using the concept of blink
without delays when you're working with families. The loop is running
blue, blue, blue, blue and each loop is checked. If the condition millis are
rated in the interval and when the condition is true, then it executes to the
code and afterwards it can also execute auto parts of the court. So when you
are new to the concept of blink without malice, go to examples on digital
and go to blink without delay. For example,
We are now implementing the blink without delay in our concepts, in our
program codes, and therefore we need to declare eight new variables.
Previous models and the interview the previous minister has at the very first
beginning zero and the interval is set to 25 seconds. Then jumping through,
jumping to the loop. Now we are getting rid of them. Candy. Because now
we're going to use the new concepts. So what we're going to do is we are
first declaring in the loop a certain area that is called current and.

And this release is set to run time. So that means how long is the program
running? So we are printing for a deeper purpose. The current release out of
the ceremony time and now we are making an if statement. If the current
release, minus two previous movies created, then the interview. Then. Make
our main logic. So let us go through this code once more. We're not
finished, we have to set back the current the previous meetings, so. Tick,
tock, tick. OK, we are starting to program the current malaise the previous
Mills is set to zero at the interval sets to 25.
We have the first, second to second, third, fourth, fifth, second. So for
example, a fifth second five minus zero is not greater than 25. It's a false set
of code that is not executed. The loop goes foot on the gas foot. On the 10th
12th, the concert took a 13 seconds hit. When we are now into 25 seconds,
twenty five point one minus sidra is greater than the interval set to 25
seconds. Yes, it's true. It's now our main logical code would be executed,
but the previous release is set to the current release. So the next loop we are
now at the twenty seventh, second twenty seven minus 25, which we know
on the set. Here are two seconds and two seconds are not. That then sets the
two the twenty five seconds to the interval. We are thirty five seconds long.
Thirty five minus twenty five from the previous Milly's is not great to the
interval. You see, this is a very simple way that we can.
Yeah, making delays without delay statements, but we are working with
theME statement. Let's compile it and check if we have everything written
correctly. This looks good. We are uploading the new sketch to our Arduino.
Then turn off the other camera, and so the display is exactly the same, only
the logic behind will be a little bit different. So we are switching on the
super monitor. Now you can see it connected to WiFi. Cranes are loaded,
cats are loaded, and now the mills should be printed out, and at 25, you
should see that we jump right into the bitcoin. We have 20 seconds. So
every entry is one loop duck. No, we have done bitcoin. With fifty seven
thousand one hundred fifty seven west us. And in the next 15 or 10 seconds,
it should jump to the Ether Ethereum. So. Forty, 70, 80. 50 seconds and it
switched to the next one. As you can see, our main logic implementation
works very well. And now for further purpose, I would say we are
convinced this current mill is setting and also that we see at the very first
beginnings such data I would recommend to delay one thousand and sell.
Zero. That we start with bitcoin. OK, then we see us in the next project.

OceanofPDF.com
CURRENCIES
This project we want to add. The US or the euro sign or text to our display.
It's. Very fast implemented, we are going to our cover story and therefore
we are setting up a new interchange. It's called currency and it's a flag
conflict. As always indicated, some status stands for doing something or not
seeing time and to keep it in a general way. I would suggest we are going to
each switch case and setting to show currency. So, for example, show
currency is one for bitcoin.

Also for the theory of Dogecoin, but not for a long cat effect, and also not
for our last case, for our local this our domain name. And then at the very
end, we're making a statement before we send it to the buff if the currency
is one. Then we are seeing you. It's cheap to point six funds into a setting to
fund. From the text, the both. And then I would say we are a drawstring
with X plus 20 points and also plus 20 for that. Y axis and then we are
writing us, but converting it to string to be very sure and converting this
string to correct. This should be everything, I think. Let's check the pile and
upload the sketch Guarino.

And with this concept, you can also implement a logic case where you can
switch between U.S. dollars and euros, for example. So. Then switching
cameras. We are loading. And now the bitcoin price should be opened
underneath their currencies and should also be shown on the display. So
there may be some issues. Let's check the super monitor. Although
everything is good now, we have to use steel. We also can design, for
example, then we have to change a string to an aching or a bitmap. So now
we have a space underneath the USDA and in the next project, we will hear
the fetch timestamp.

OceanofPDF.com
API - TIME AND DATE
One of the last tasks of this group to take on a project will be that we use
the last updated field from the CoinGecko API to and this information will
be displayed on the bottom of our only display. Therefore, we implement
the time in each library. And also we declare these two very one. The object
which holds the epoch and also the team is its own kind of structure. And
this holds the information from the singing fields of the date, for example,
that day, the second last month, it's the so before we start, I would like to
give you an overview of what we are going to do in the council. It would be
nice if we have, for example, here to set a new font because it should be a
little bit in a tiny font. And then we should get something like convert
timestamp to date, for example, and then we're given to. For example, this
factor should return to the human readable date, and this date will be set to
the bottom of our display with raw string.
Then we are setting the Coordinates X, for example, we are giving you the
five fifty eight fifty seven, then the text. And, as you know, not a strong
character, so this should be the function. Therefore, as a first step, we have
to go to the wife here because we don't have any strings for the time,
therefore BTC time, ether and time and touch time because each of these
cryptos can have different kind of timestamp, as we've seen before, then
going down to the data. Now, as we did with the cat facts, we need some
temporal strings so that we are right. Some some saving errors, some issues
with locating them, the memory. Temp time is stuck, and then we're using
bitcoin. Last updated. It's. So. Let us take short films to the API classic. Can
you remember each of the objects have and last updated with the. Current
with the time stamp from the Congo, Kosovo and you see. Every time
stamp is a little bit different. OK, so bitcoin was from an timp instant
bitcoin time is 10 times the same but different for Ethereum. Ethereal, last
updated we take to him, then we have to have time to have the same with
Dutch. With On. Last updated on Make three. And reference to the Dutch
town.

Then going back to the main. The program, but this time the first one is
already set in, let us implement it for Ethereum. We're taking our time.
Currencies more and the funds. So and also a third time for the Dutch coin.
Look under the price tomorrow. Well, structured touches on. Yes,
touchdown, touchdown. OK, so now the main components are
implemented, but the main program is missing, so we have to hit function,
convert timestamp to date.

Therefore, I go a little bit up above the call center, for example, making and
string convert timestamp to date string timestamps. So therefore I will print
out the current reference timestamp so that we have for debug reasons to
see if the timestamp is correctly shown. Then I may be making a team T2 so
that everything is saved in the function and I am living in Austria, so I have
to set the correct timezone. And for me, it's one hour plus. That means I
make two of them and the timestamp which we reference, I change to an
integer and it's three thousand six hundred six instead means one hour. And
then I'm passing this to the local time. And now, with a short delay, I have
an excess of all the elements of data. For example, now I can maybe, for
example, make a tempera or and string. That means. Readable dates and
readable dates. Should we have string or, for example, T2? That's our safety
and also referenced here with and we should get the minutes from the
timestamp or the hour for the timestamp. And when we converted to
industrial.

Then plus double blind plus string to points to mean, then we should see
just hours and the minutes. So do I have. Oh, of course, I have to return
readable dates then. First check. Uploaded from the first checks. Switching
to camera. Starting the ceremony, Don, are we on line? Yes. So. Connecting
Queensland's Catholics should be loaded to them, cats have seven million
neurons. But when you have to stick to them, so then. What do we get, do
we get anything? Contestant, yes, there we go. There we see it, small, but
it's here.
All the focused forty twenty two, so depending where fear the current time
displayed them, the main function is working, then we have to adjust a little
bit more down because we also want to show the whole the whole date,
therefore. One function is missing because if we are using this kind of
string, we have no leading theorist. It means, for example, if you are, it's the
morning, it's seven 00, for example. Five, then now it will be displayed in
this format and this is not really human readable. Therefore, we are making
an ideal detour and displaying all the serious bleeding seriously. Therefore,
women can if and we say, we're converting it a little bit quick and dirty, but
it will lead us. To. To do research what we do once an hour and when the
length of this string is one, then we are adding a leading Syria to it. That's it.
Simple as it is. And that's what. The string is still for a German student and
also a string for four minutes. Else. This is. String. Well, you are the same
we are doing with the minute. Team minutes. Links one, then give me the
minute with the leading zero else. I only do it once a minute. Yes, yes.
Then. We're making policy shortly, and we are now making our whole.
Whole string, we are beginning with the hours ending double points, adding
the minutes ending whitespace, adding there. Today, I would say, ah, what
do you see today? M, m, d and plus. Point. Plus, string teacher theme month
The European Way. But be careful. We have to at once because of one,
because it's index based with a strong point. Plus string to team. Yeah, and
here we have at nineteen hundred. So. Am I missing something? + +, +, + +
looks good to me, one more check. And you.

So we are switching. Victor, you know, it's not 100 percent. It's loading. It's
flickering from the webcam. So are we in focus? I hope so. It's loading, it's
loading. But there will be coming soon, I hope the bitcoin price, will you?
Yes, there we go. So it's a lot of flickering, but now we have a very well
formatted, very well formatted time and date value here. And this is now
one of the main purposes that we implement. We now have the bitmap with
the price, with the currency, and we have the fetched dates from the
CoinGecko API. So you can see. Very, very good. So as a next point, we
will implement the whole project for the other platform, for the USP 80 to
66. But for now, we have finished now. Our crypto ticker for it is 32.

OceanofPDF.com
ADAPT TO ESP8266
In this project, I would like to show you how you can adapt the whole
project, which we are made on, especially to the 80 to 66. First of all, I
would say we are changing the wiring part. So this is our existing project
with certainty to interiors my dear one M.. So first of all, we are going to
connect to 5G Part five modes to see into the from the let's display the
same. This groans to grant. And when you see or take a closer look at the
pinata from the T one, you can see that it's in. Port is the one. And a state
should be ready to let us check this once more on an actual pinot. The one
mini pin, an art civil war. What is a good one? Let us take this one. The one
is C L the one. Perfect. So this was the first part we have adept dipped in
our old wiring. Not rocket science.
And now we want to update our quote references to the ESB 80 to 66. So
first of all, switching back. We have to adapt their construct for the whole
display, and therefore we are using them and other constructs, and this will
be, it looks the same as your G2. It's also for a sixty one thousand three, the
same size as the new name. And what's the difference is we are making a
more abstract visual stay and no pin on the reset. So. I think this is the main
data. There shouldn't be any changes anymore, but we see when we are
compiling, then we go from hour to hour. So switching to my wife dot h.
Then we have to make a lot of changes. First of all, we get rid of these two
libraries and we have to implement the USP 82 66 way of the original
generation. And really, you and secure could be the same. So first of all, we
are commenting out until the disorientation because now we're making the
HDP get request a little bit different. First of all, we are declaring victory
and secure clients. Then we are making all we declare Selva very able in
charge.

And therefore, we are not using HTTPS. Of course we are using it, but we
do not declare it. You will make this with the proper port then. We are
saying that we are not. Proof of the certificate of the sites because you only
want to fetch some data to get some data, we are not in any exchange with
any data exchanges, etc. So we are not. We are setting this off insecure and
then giving some text out. It gets my cryptos and now the metric will
happen. We are saying if the client connects to the server, so this one and
the Port 443 will be the HTTPs port. If you use 80, then you shouldn't have
or you should use and you will without the HTTP s, then it's a little bit
different than we used to implement before. Now we are seeing a client
print a line with the parliament that gets it. Don't forget the slash and then
everything after the well will be pasted in the second line. And also at the
end, we are here using HDP slash one point zero. If I'm using one point one,
I'm getting some chunk data. And then I have problems with
disorganization, disorganization and chasing. And that's the reason why I'm
only using the HDP. Then the next line would be client print line host. We
have also the declared host. If you don't use it, then we are running into it.
Starters are all for hundreds. Then here we are, printing the line connection
closed. Also using some blast printing lines. And if we are. Not successful,
we are also printing a line connection. It turns out the mud, and it's in a
proper way. So after this general statement, we're making a delay and we
are making a new local variable, it's called. So it's a very good name for a
fun string. And now maybe you know it, we are making it. And while that
means as long as the client has data for us, fetch it and put it into our
stream. We say clients read the string until and we say until the last line
break. After that short delay. And we are seeing that we want to get rid of
any white spaces or line breaks, and then you're sitting on a dynamic
chasing object, but setting the buffer to 24 48.
You also can make this a little bit more dynamically with the so-so length
it's. But you get the idea what we are doing here. OK, the next line will be
the same as we did before because. We are fetching the data from the chase,
and that should be the same. That was in general. The main adaptation of
the whole album. Gifts and fetching data. Let me think a little bit more. No,
I think that everything should be done, then the next one. Getting rid of the
kids, they don't. Simple and make the same thing as before. I've already
made this one. So we can delete this one, insert this one with the same
structure as before. I only made new variables so that we. Can't run in the.
Conflicts with the same variables. Here are the facts that mention the same
report, also the same host as we declared as the silver, then get facts as we
used in the example before it used to be one point wrong? Then we're
declaring also in string variables and also reading the string until the last
line break. We're making a dynamic chasing documents and then we are
fetching the data facts and references to CAD facts. That's, I think, all we
need to do now. Let's check if something is missing. Yes, I can't succeed
with the compiler because I haven't changed the board. Tourist boards note
and see you one, where are you? You're here, and then the next point will be
the proper plot, I assume. Hmm.
Which parts? Just connect. Go to the box. Give it to the manager, it's the
device manager, go to the youth sports and it's come five and windows for
me, go to tools to port. Five. And now let's check it again. I know
something is missing something important. And in the very evil declaration
from my old, we have to adapt the prop man with. These additional texts,
because otherwise, I always get an error. So it's changed, it's. And let's try
one more. So let's upload this proceeding, you'll see it takes much, much
longer than with the ESPN 32, but nevertheless. We are more than half
souls turning on the other Cameron so that we can see what is going up here
and then we finished. We are finished. Turn on the ceremony time and also.
Can see its loading. Connecting to WiFi. Now we have another IP address
getting my cryptos. Coins are loaded to get to market facts. And. Get facts.
In 1982, Katz overtook docks as the number one in America. Nice to know,
and this year we have our bitcoin price and also with the currency and the
right current date. Nicely done with ESPN 80 to 66. You see, that's well,
just some minor changes to adapt it to another platform. And now we have
here also that you can see it on different timestamps. But also, this is a
really cheap way to implement the crypto ticket because ESPN costs around
five euros. And also the displays are around one to two euros. And now we
are finished with the coding parts. Let us focus on the assembling and
implementation of the real product.
OceanofPDF.com
SUGGESTION FOR A 3D
PRINTED CASE
Hello and welcome to the next chapter of this online course in this project, I
would like to give you an idea and how you can implement or build your
own 3-D case for the scripted Typekit project. So I've made a small case,
and I will guide you through the main idea of this case. First of all, there is
a proper fit for the all display. And you can see there is a little deepening.
So that's the only display that fits perfectly in, and there's also one more
part to small plates, which fits perfectly into this deepening. So that's all it
can't be the fallout of the housing. There are also some parts on the
backside. I have found breakout boards and Michael was a person. It's
because I think it's it's mix and really pretty case when the USB port is in
the middle, not just somewhere above or underneath the topic on the case.
And also to use certitude as you can see it. And also the USP 80 to sixty six
has enough room in this case. Of course, this shouldn't be soldered in the
final product, but you get the idea. So let's take a closer look at the finished
product. So here is to all displays displaying the site wall and you can see
it's. Perfectly fits into small plates. And I get it out. Which holds the display.
Also, you can see the micro USB port. The breakout port and decide where
it's a little uplifting pilot so that it really fits perfectly on the case and you
can screw the sidewall with these tiny screws two centimeters in length.
Also perfectly fits into these tiny holes. And then you have a good looking
case which looks very nicely in small, perfectly to your desk. So that's a
short summary on how I would give you an idea how to. You can
implement, replicate and switch 3D printed cases for your trip to tinker
projects.

OceanofPDF.com
ASSEMBLY
So this is one of the last means of a design course, and now I'm soldiering
altogether. If she departs from the case and also the components, so I'm
going from the Micro Usb Breakout Board, from the music scene to the
arena, on the grounds to the older, you know, and from the Arduino, do you
want me? I am connecting the four pings, as we did before to the whole
display.

Then I'm all together on the side. All are connected to the main case and
then we have a finished product. So, yeah, let's do camera one for a while
so that you get a good overview of how I'm sitting all together and then I'm
looking forward to seeing maybe in another class.

OceanofPDF.com
CREATING FIRST SCADA
PROJECT
Hello and welcome to this new lassonde in which we will start by creating
our very first scareder system that will be controlled by p.l.c. adultery. Alsi
So let's start by creating a new project, click on this item or this icon and
create a new project. OK, let's start by writing the software. Look here new
this is the main new project window here, we must drive the project name,
let's call it Delta P.L.C. Controller Scudder here. You can choose where you
want to save the project. I will leave it to the default document in the
software studio projects. And here you can choose the configuration file
where you want to save it. Now there is the target platform. You can choose
windows or windows and embedded, but since we are working locally, we
want to choose Windows local interface.
As you can see, it has a limit of 1500 tags and you can choose whether you
want to service, serve, server, server, plus room or online depending on
your needs. But if you want just to control your policy using your computer,
choose one of those local interfaces. And as you can see, you can modify
the target platform and product type after creating the project by using the
project tab, which is this one. So I'm satisfied with this click. OK, this
command will stop the project from continuing since we ran the project
previously, then click. Yes, I want to stop the project. OK, now, as you can
see, it will simply be an empty application. What do you want, the
resolution? You can see the words and part of that screen that you will use
in your shadow system. I will choose, let's say, one thousand three hundred
sixty six point seven hundred sixty eight, which is optimal for laptops and
most displays. You can choose any of these depending on your resolution.
You can know your display resolution by going here to display settings.
And by going down, my resolution is 1928 by one thousand eighty. So, as
you can see. It's not available here, so I can't create it by myself, by going
here. And clicking Okay, after that, let's go back to the vendors of software,
as you can see. This is it, this is our software interface now first things first.
The first thing that we need to set in the communication, go to hear the
communication window and. Right. Click on drivers. Select and remove
drivers after that. As you can see, we have a list of complications of
protocol. We want to choose the protocol that we are going to use to
communicate with the p.l.c. Using this SKALLA system, we are going to
design the system that is most commonly used is modde bus. So scroll
down until you reach them later. OK, as you can see, what was protocol
after you ask you version ten point eight, then click select. This is the
protocol that's mostly used in the industry. If you have a special protocol,
you can check out here to find it. But for Delta p.l.c. and in software, I
prefer using Modu so click that would be you and click select. That's it
would be you after that click. Now we have the view and we have a main
driver seat, so drivers the automobile and right clicking on would be you
then click sitting's. Here, as you can see, we have a new window. This
window is used mainly to set the configuration, select the communication
settings that are compatible with the C communication settings that you just
used. We already mentioned that we are using the LC with the portrait of
9600, which is basically the most common moderation. We have seven that
bits, not eight One Stop bits and even variety, as you can see here. We can
choose the serial encapsulation here. We can choose the composite for sure.
You choose the ball that is available to you when you connect the world to
the computer by checking here and the device manager. Go right click on
the start menu device manager. And you will find it here and boards and
after the board, you will find a common and a number, you must show the
very same number here. Then. All the other siblings are left to default, so I
prefer here choosing aski. Not after you click, OK, now you just, uh,
configure the communication protocol, which is not you, next thing is going
to the main driver seat and clicking open. Once you click open, you will see
a list of tagged name stations, input, output, address and action. This is the
main driver. It's a very important sheet. And it's where you will input the
data necessary for the p.l.c., input and output and data registers. But since
this is a very wide and a very important topic, I'll cover it in the next
lecture.

OceanofPDF.com
FUNCTIONS AND
ALARMS
Now, let's talk about the main functionalities, and they include human
machine interface. Now, the human machine interface is basically providing
less reports, graphical objects, date presentations and so on. So it's easy for
humans to interface with any machine using scanner systems. It doesn't
require a learning curve, and doesn't require training. You can just see the
play and understand everything in the system from that display. There is
also operator command handling scanner system handle. The operator
commands easily, like changing binary commands, set points and other
commands like turning on or off the whole system. Scott also provides
alarm and events which basically record important changes and operator
actions for future insights. There is also the history database. It keeps a
record of the process values over a period of time so that you can go back to
that record and see how your system behaves. And if there is a problem,
you can easily solve it by going back to this type of information. There is
also data logging. It keeps logs on the operation of the automation system.
And in case anything went wrong, you can go to that log and see the exact
time and place where this error took place. There is also reporting, which is
a way to generate different reports like incidents reports, and it's really easy
to generate a report without having to copy and paste a lot of things. You
can just press a button and the software will create a report for you and you
can share it with your colleagues and your administration to show them
inside of your system. Now, the human machine interface is basically a
display that shows you or the easiest form of this eye is a display that shows
you the system. And you can easily interact with that system because
everything is clear.
Now, when we talk about the three main functions in the operator
workspace, there are alarms and events, current state trends and history.
Now, when we talk about alarms and events, you need to know what is an
alarm or an event alarm and event or a. considered changes occurring in the
planet or the process or in the control system that are worth recording like
the operator actions turning on out of the system. That configuration
changes, which basically changes a set point for that control system,
changing that input, changing how the system must behave for a specific
input. All of these are recorded now. Record changes can be of three kinds.
Informative warning and blocking the informative records is basically
adequate, where no action is required, like production terminated at 11 30,
while that warning records planet could stop or be damaged if no corrective
action is taken soon. Like, let's say that there is no tuner and a printer. So
this warning must be handled immediately. And there's also the blocking
records, which basically when the controller took action to protect the
planet. And further, that operation is prevented until the result is cleared,
like and apparently if there is a backup.
So some of the changes must be blocked. So when something happens that
might harm the system and the employees, the system must stop. This is
called a blocking record. That is a warning which is basically a way for the
system to tell people that something bad is about to happen. You should
solve the issue or turn off the system. And there is the information where no
action is required. It's just to tell people that something happened and it
won't harm the system. This is the alarms and events. And it's not just
Escada. It's in life, too. So you need to know that we have three types of
record changes that we must take care of: informative warning and
blocking. And if you are writing any code or any software in any language,
you must make sure that you have these three levels of alarms and events
that inform the warning and the blocking. Now, let's talk about what
triggers and allow the first thing that might trigger an alarm is minor
changes of process, variables like individual bets, some variables being
dedicated to alarms. Another case is the reception of an analog variable that
exceeds some threshold like upper limit, lower limit, or the limits being
defined in the operator workstation. Another case is the reception of an I
love message from a p.l.c. that can generate such a message.
Computations and the operator workstation is also one of the reasons that
can trigger an alarm, possibly quality loss if current trend continues. There
is also an alarm that might be triggered in calendar actions like, let's say, a
specific unit in our planet or factory didn't get prevention maintenance for
the last three months. This will trigger an alarm indicating that this machine
must be included in the maintenance schedule for this week or else it might
break. So different things can cause different or can trigger different alarms.
Again, you can control why alarms are triggered in your code and you can
choose whether to tell the whole system or not of any specific scenario.
Now, let's talk about trends. Trends allows you to follow the behavior of the
planet and to monitor possible exertions monitoring processes. Data or
samples or event events are stored in the historical database. Now most
scatter systems have a dedicated. Database that can be used to store
historical data, which is very useful when you want to study the system.
Here we are over 12 months or over a specific period of time in the past just
to make sure that you have quality control and to see where you can
improve the system to reduce the cost and increase the production quality.
And this is a good example. Now, let's talk about Historia. The historian
keeps process relevant data at a lower granularity than the trend records.
But with a larger quantity, data from different sources is actually created in
one database, normally using data compression to keep storage costs low
that are analyzed according to calculations, engines to retrieve matrices.

And some of these metrics can be performance indicators that measure


quality monitoring and analysis of certain situations like Why did maté
work better than HP? Now, historians are a good way to keep track of data
and you can easily analyze this data depending on different metrics. This is
another useful feature for the system. Now, that was a quick introduction to
the systems. I know that we could go like hours talking about Scarra
systems, but this was like a quick introduction because if you are joining
the scores, you are most likely familiar with scatter. And what we will do in
the practical section is basically teaching you everything you need to know
about how to create a scatter user interface, how to code your
microcontroller to communicate with that user interface and share data with
it.

OceanofPDF.com
SCADA SYSTEM USING
ARDUINO WITH FREE
SCADA SOFTWARE
Scaddan, or supervisory control and data acquisition systems are currently
employed in many applications such as home automation, greenhouse
automation and Heiberg Power Station. Commercial scale systems are
costly to set up and maintain, therefore, those are not used for small, let's
say, systems. And in this course, we are going to apply scaddan software
and Arduino onal to monitor sensors and to control outputs and to read and
put data. That design system in this course will use sensors and Arduino
microcontroller and a free version of the software. The Arduino
microcontroller will collect data from sensors and communicate with that
computer through a USB cable. And we know all will be programmed to
communicate between the Arduino and the system interface by using a
communication protocol that will be explained in this course.
The main goal from this course is to show you that Scareder works in real
time and can be effectively used in monitoring any system using a symbol
Arduino board. And you can create a state of the art user interface that's got
a system to control your arduino, to read sensor signals and to send output
signals to control different devices. I'm sure that at the end of this course we
would be able to create our own scatter system and to control Arduino, to
draw our own user interface and to place anything you want in that user
interface. It won't cost you because Arduino is a very cheap microcontroller.
That software is available online and everything is ready for you to use.
Everything will be explained in a step by step manner.

OceanofPDF.com
HARDWARE AND
SOFTWARE
REQUIREMENTS
Hardware and software requirements. Now let's talk about what you need to
do, everything we will do in this course. First, you need a laptop or
computer, you need an Arduino. You need a USB cable to connect your
Arduino on your computer or laptop. And you need buttons, sensors,
motors, anything you want to control, inputs and outputs. So if you want to
connect a switch, a sensor as input and you can connect LEDs, motors,
LCD displays as output, you will also need that in the software. And we are
going to explain how to download and install the software.
So this is basically everything you need and it won't cost you a lot. It's
available and Arduino balls are very cheap boards and you can get it
anywhere online, fast watching this lesson. Make sure that you have at least
an original board, even if it doesn't have any sensors and output devices. We
can use the built and led to show you how to communicate with your
Arduino using our Scarra software.

OceanofPDF.com
ARDUINO BOARD
The only report that you can see here is Arduino horno, and it's one of the,
let's say, most common Arduino balls ever. It's even cheaper. So you can get
it for less than twenty dollars. And some providers are selling it for less than
five dollars. So this is the ball and let's see the hardware specifications. This
is the USB port where you will connect you to us cable. This is the power
input. If you want to power your Arduino externally, it usually takes
between seven and like 12 volts. Now, this is a switch to report your board.
And here we have the artex or that, he explained, are LEDs that will turn off
when you are using zero communication. This is a built in land connected to
PEN 13, which is a general purpose input output pen. And here we have a
ground pen.
Here we have pens that support B.W. And as you can see, anything that has
this sign supports B.W. arm, which is pulsed with modulation. Same here
for this. These panels benzyl and one are used for taxand are exterior
communication. This is the power indicator pen. It will turn on when you
connect your arduino to our power supply. These are the analog pens and
we are going to use these pens to connect our sensors. This is the voltage
input. You can add power input, the set of this and this. You can use this pen
to provide power. You are doing all these two underground bends. This one
is a five ulpan, three point threeVolkman resettlement. Now, this is the
whole board. All of these are digital pens. You can use them to read digital
input or send digital output single. Now, these are the specifications for the
board, the main microcontroller is the Atmeh 320 HP, which is an eight bit
family microcontroller. There's the operating voltage, it's five volt, the
recommended input voltage. It is between seven and 12. That is because the
input value from here will go through a voltage regulator of five volt
regulator. That's why it's recommended to add seven to 12 volts. Now the
input voltage limits are between six and twenty volts. Anything more than
that will break your arduino that underpins Tazz from zero to a five six
pence.
The digital pens, fourteen point six of them are probably on pain or support.
B.W. output that this is current on the input output panels is 40 million. So
there is no way that you can withdraw anything more than that. That's why
if you want to connect a motor, you have to interface with Rayleigh or
transistors. Now the DC current on the three point three volt pen is up to 50
million and the flash memory is first to Kalabi and point five kilobyte is
used for the bootloader. So you end up with like thirty one point five
kilobytes that Islam is two kilobytes. Abran is one kilobyte for storing data.
Even if the bar is gone, the frequency or the clock speed can go up to 16
megahertz. So these are the specifications for our Arduino board. I
recommend using Arduino on any Arduino board will do the job.

OceanofPDF.com
CIRCUIT CONNECTION
The stimulus on energy is going to connect a very simple circuit that we are
going to use in the practical section now for our circuit connection. We will
use the Dinko CAD website, which is also the stinko card. You can go to
that website by visiting Hankuk dot com and simply join now and you can
enter your details, create a personal account, Sigonella or Google or Apple
account, or you can simply sign in with your Microsoft Facebook or sign up
with email. Now you need to enter your information and create a new
account. And since I already have one, let's jump in to the signing. But now
I also know that Google has a better security system and doesn't have to
memorize a lot of passwords all the time. So let's not Google choose your
email account and that's it. Now you are sounding to think of that upside
and you can start connecting your circuit. Now go to the circuits section,
click, create a new circuit. And from here, we will start connecting our
circuit. Now, go ahead and write Arduino. This is arguing honor, drag and
drop it here. Now you can rotate this bald. And this is the final. Now, here
we have the digital input output and here we have Daniel. Let's bring. I am
Bridport. A blizzard here now let's connect five Volks. Changed that much
to read and disconnect the ground. Change the color to black. Now the spirit
board has power. Now we need to lead. We also need something better. We
will need a disaster. Looks like a potential Mr. and Mr.. We can also get our.
They are sincere. You can get a temperature sensor if you want. It's up to
you now. Let's see what we will do here. Now let's talk about Spartan
Narrung, this sense of drag, the British meter. And the temperature sensor.
Now we connect, I will connect the power underground. This is the
Grampian and it's going to stick around from here and here, we have
another got. Now, I'm sorry, now we have the cathode which must be
connected to ground as well and isn't connected through a two hundred one
resistor. And the other side is connected to one of the digital pens. Let's
show the character. Now, this is the analog and is connected to a zero from
the potential meter. And here we have the analog output connected to A1,
also from the potential meter. Now. Just to make sure that we can recognize
things. We also have a button here. Now we can connect the button using,
uh. Resister. Now, this would be our sister, let's connect the other Turnell.
To five volts, so here we have Terminal one, B to be one, a two. So these
terminals are connected to five volts and we need to connect the other
terminal to, let's say, PIN number three. So now we have a button connected
to the number three we have allegedly connected to PIN number two. As
you can see here. This is the lead. And this is the battle. I'm trying. Let me
change the color to yellow. Now, we also have this, which is a digital, uh,
sensor. It provides an on off signal using the signal pen. So it will connect it
to the number for the colors for that pen. Now, we have a lot of devices
connected, digital and analog devices, input and output devices that are an
output temperature out input, potentially meet up input. The button is input
and these sensors. And so the only output here is our lead. Now, these four
inputs and this one is additional input and this one is additional input. Now
this one and this one, the potential meter and a temperature sensor are
analog input devices. Now, this is just to demonstrate how we will connect
different elements to our Arduino. Now you can, like, just connect a button
and it will be OK for testing purposes or you can simply connect one
sensor. We can remove one of these sensors and eventually we will start
with a button and tell it just to make sure that we have the right connection.
Then we can move on and connect a temperature sensor, motion detector or
any other sensor.
Now for analog, I usually use a potential means of this analog input because
it's more accurate. Then I move on to connecting essentials. This is the
circuit schematic and we still have the power pens. They must be connected
to five volts. So this wire to read, same here we have the power. So we need
to connect it to five five-fold and the potential meter must be connected to
five volts as well as a little bit messy. But you got the idea that the
temperature has three bends, the power on the ground that must be
connected here and the V out must be connected to an analog pen. The
potential meter has three bends to the ball on the ground, the one in the
middle to that analog pen. The lid is connected to ground and the other
terminal with the resistor is connected to a digital pen or arduino. The
digital sensor can have three terminals, power on the ground and the third
term, the signal terminal must be connected to a digital input when our
arduino that's it. And the button is also our digital input must be connected
through a resistor to five volts and the other terminal will be connected to
our digital input. So we have five devices connected. This is a simple circuit
and I'm sure that when we move to the practical section, you'll understand
more why we connect to each of these elements.

OceanofPDF.com
MODBUS RTU
What you are going to cover, Morbus art, arterial communication protocol.
Baath Party is an open cereal protocol drive from the master slave
architecture originally developed by Schneider Electric, it is a widely
accepted cereal level protocol due to its ease of use and reliability. Molpus'
article is widely used within building management systems B. M. S and
short and industrial automation systems, which is I. A US Morbus RCU
messages are a simple 16 bed structure with a CRC or cyclic redundancy
checksum. And the simplicity of these packages is to ensure reliability due
to the simplicity. The basic 16 BickmoreBossart to your register structure
can be used to pack floating points, tables, ASCII text cues and other
unrelated data.
Now, this basically means that any type of even complex data can be stored
and transferred using a 16 bit structure of our mod passata you
communication protocol. Now, this is an image that shows you that using
an Internet cable, you can connect the bus so that you can easily
communicate with people or between different devices. Now, this protocol
primarily uses an R. S two or three, two or as four eighty five serial
interfaces for communications and is supported by almost every
commercial scareder at Shammi ABC Server and Data Acquisition Software
Program.

This makes it very easy to integrate Morbus complex compatible equipment


into new, all existing monitoring and control applications that would passata
you protocol users a master slave technique to communicate between
different devices, meaning any application that utilize the most pasada
protocol, such as in the soft Scarra software that we are going to use in this
course will have a Bassmaster and at least one Mod Barzelay, such as P.L.C.
Arduino Horno or any other microcontroller. Bassmaster is typically a host
supervisory control or computer running software that will communicate
with one or more mobile devices. Communication sitting must be matched
between master and slave and some of the common settings are at the board
rate and we know that the board rate is used in any communication.
Protocol we use will choose 9600 bits per second and the database to be
transferred. We usually choose eight and you can select a barrier to check.
We usually see the Tanon and the stop. It is one now in our, uh, let's say, uh,
scareder structure here you can see a symbol system. Here we have eyes,
Gaddar. It can be a chameidesHobley or a computer system. It's connected
to the Internet and communication protocol, which is just two different
devices here. We have a control and platform and here we have a remote
input output unit. And here we have the actual input output. You have a
button, a motor baza or any other thing. So this scareder system will control
these output devices using that mode based communication protocol. Now.
Here is another picture that makes it more clear for you regarding the Mod,
Bassmaster and Slive structure, this is ArmontBassmaster. And here we
have three slaves. Now you can have more than three slaves here. And so it
can be two, three, four, five, six, seven, eight. Now, the Bassmaster will
send the request to read or write and that request will go through the mod
bus. You and if it is directed to the slave to it will go here and slave to
receive that I'd write a request and it will send a response. Now, that
response will go back through the area due to the mud bassmaster so that it
can decode it and understand what's happening now with mud, but you have
a device that asks for the data, which is the master and the device that
provides the data, which is the slave.
And usually each of these devices had a mud bath, Heidi. There are
different addresses that are asking or there are different addresses that the
asking device uses to request different data, which is the master. So master
can call a slave one with its address, slave to this address and so on. Now,
for example, if you are looking for a real power from the inverter, it could
be at address fourteen thousand other than a type of 16 bed integer. Now,
we will explain more about that in the practical section. But this is
everything you need to know about the Morbus article communication
protocol. It's a communication protocol that makes it easy for a master to
communicate with slaves, and we will use it to send and receive data
between different devices. And it has a very wide range so you can connect
to devices at a very far distance, and can go up to one point five km. That's
why it's widely used and it's easy to set up. Now, in the next lesson, we are
going to start with the practical section. We will start with a software
download, then we'll move on to the practical implementation.

OceanofPDF.com
DOWNLOAD AND
INSTALL ARDUINO IDE
This is the education engineering team, and today we will teach you how to
download the software requirements of this course, which is Arduino ID.
First, you must go and search for Arduino I.D. using Google or Bing. The
first is Windows, you see, which is the official Arduino website. You can
either use Darwin Web editor without installing software or you can
download the Arduino ID now, depending on your operating system, you
must choose one of these Windows, Mac or Linux for my case, its Windows
installer. Now it's asking you to donate or you can just download. Click on
Save. And you have to wait about three minutes for the download to finish.
Now let's see the Arduino website. It offers. A lot of products.As you can
see here. You can share any of these items from the official website. These
items include Arduino boards. Green kids and a lot of other interesting stuff.
Now let's see the other kids category. As you can see, this kid, um, this is all
about kids. It has a very.
A very interesting collection. You can also buy Arduino boards or
windshields. Let's look at boards and modules and see how much each of
these boards might cost you. This is the official place to buy Arduino
boards. You need to make sure that you are not buying from places that
offer a fake ALGUIEN on boards or boards that are not manufactured,
bought by the original company. The export of arms to.Can also check the
learning section for tutorials, reference and things on new things to learn.
As you can see here, the board, the entry level, has only Leonardo and a
starter kit. No, no mini micro. The enhanced feature has the Amiga, the
Internet of Things has others. As, yes, I'm shielding the proposals for
making, let's say, a smartwatch, the printing section for making a 3D
printer. Let's see the Ormeau. And the mega. This is, uh. Arduino material
one zero one, a symbol 3D printer. As you can see.Looks. Mines will cost
you around 700 hundred dollars.
You can also see the arguin on board. It'll cost you 25, 24 dollars. Twenty
five dollars.Aldwin, onum. As you can see, this is the original stuff. Now, in
order to move your borders or not, you can flip it if it's a symbol in the USA
or Germany, then it's original. The ones that are assembled in China are not
created by the official Arduino company. It's created by Arduino associates.
And it must cost less about ten to twelve dollars or debauches such bolds.
They are not there and don't have the same quality as the ones manufactured
in us. OK, now let's see the Arduino finished downloading, let's run a
download Arduino has already installed, so you have to understand the one
that you have. OK, let me see. You have to close instances, we all know that
you have opened, then uninstalled. The previous version. As you can see,
it's removing the files. If you already have an Arduino installed in your
computer, you need to update it with the latest version if you already have
the largest version, and then please skip this lesson, click on next install, as
you can see, the installation or start. It won't take long. You can check out
our resources section, discoursed to download the code and the material to
get links for the hardware material. OK, and I had to close then go to the
start menu. Go to the Eleazar, then choose Alino. This is our original idea.
Now, to make a quick overview, this is the button that you must click to
verify that your code is written correctly. This one is used to verify and
upload Dakota Arduino. These are for orbit and save this to create a new
file. As you can see, when you create a new file, you have two main
methods: the setup and through the setup for your setup code. The loop is
for your code that will run repeatedly. And the fine is common sense, Skitch
is used to upload, verify the code or add new libraries. The tools as used to
choose the ball, shoot the ball, get the ball, inform, choose the programmer
Bernard Bootloader, which is an advanced topic, and Arduino open the
Syrian monitor or Syrian Blätter fix the encoding of the code or the IT help
is where you can find things. You are looking for its answers. Now you can
check example's basic digital analog communication controls and sort of
display. Uh, let's see that we want a basic example for blinking led. As you
can see, this is a blinking example. It's very simple, straightforward. It's
commented so that you can understand what's happening and what's going
on. So that's why Arduino is very good.

OceanofPDF.com
ADDING MODBUS
SUPPORT TO ARDUINO
IDE
The stimulus one in which we're going to talk about the mode bus
communication protocol and how to add it to Arduino IDE now. After
downloading and installing Arduino, you need to download the most buzz
library. And to do so, you can simply go to Google and write the following
wrightman bars for Arduino. And you'll get a library. As you can see here,
there is a mock bus. Now, these are instructions on how to use it, and if you
keep scrolling, you can get more than one library. Here we have our hot
bath as well. And this is the library, as you can see. And since I already have
it installed on my system, I will simply open up Arduino. Now go to the
tools.
Or sketch, sorry, click, include library and click, add to the library, now
navigate. Until you find the library that you want. Now. Here's my library
buster, ZRP, DoubleClick. And simply wait, as you can see, your library
attitude libraries check include library money. Now, if you aren't here, as
you can see here, we have our library. And once you click on it, it will add
these four include what was the text device that was registered, bank the
text and bus, slave the text. Now, let's explain a few things before moving
on to the coding lesson. The purpose of this library is to connect Arduino
horno and in the softcover software by using Morbus article protocol. Now
there are more main functions that we will need when we are coding these
functions. These four that sit in the function are used to define what must
work as a slave. The registered bank to add function is used or is a
command that is used to define addresses of registers which are used to
send data to the software on the computer. And this practical
implementation, the address will go from all the addresses will go from
thirteen thousand one to thirteen thousand five.
And we will explain that. More details and the practical section. We also
have the set command and get command. Now, the set command is used for
all data on the previous addresses. Target Command is used to read data on
the previous addresses. This is everything that we need to know. Now, let's
say that you couldn't find the vast library that we were using here. You can
simply download it from the resource section. And if you couldn't get it,
you can contact me via WhatsApp on this number or you can drop us an
email at info radio and each team dot com and try to post a title, which is
Bus Library, and we will send you the bus library without any issues. That's
it for this lesson. If you manage to download the library, include it and use
it like this, then you are ready to move on to that coding lesson. Thanks for
sharing this lesson. If you have any questions, you can ask them if you want
the world. Now, one last thing that I need to mention is that we are going to
connect Arduino to our PC using a USB cable and this will be our best bus
interface. Now, you can change this with another connection. It's up to you.
But for our practical implementation today, we are using the simplest
solution, which is you a. Now, another thing that I want to mention is that
using what was here, an Arduino idea is like something you have to include
yourself in. It doesn't come with motor support by default. That's why you
are adding and installing this library.

OceanofPDF.com
PROGRAMMING
ARDUINO MAIN
FUNCTION
This new year on energy is going to start with the Arduino programming
part of the practical implementation. The first step after installing the library
is to go and open up the Arduino. Now you need to install the library, as we
instructed before, so make sure to visit Battlezone before moving forward.
Now, once you have that library, the first thing that you need to do is go to
sketch, include the library and head down to the Mod Bar library. As you
can see, it will also include these four lines. And this is the most basic
protocol. This is for the devices. This is for the register banks. And this is
for the slave addresses. Now, the next thing that you need to do is to create
an object from the mud bath device. So go here and write Mabahith.
Device. And right to just Thurbon. Now, this is where all of the data
accumulated will be stored. Now, the next step is creating the modern slave
protocol handled by the rioting mob boss. Slave. Slate. Now we are using,
as you can see, these libraries to create these two variables, one, for storing
the accumulated data and one for handling the slave protocol. Now, if you
want to use different functions, different circles, control algorithms, you
would need variables. So you'll need to define variables that you will use in
your program. So let's say that these are the variables that define. Area and
as we go when we need any variable, we will define it here, then we'll use it
down here. Now. We need to make sure that we are going to talk about a
Bassmaster device with a device I.D. that we specify at a specific moderate
and let's say that we will use the device I.D. five and the moderate at 9600.
So let's assign the device ID. Right. Syria began. Nine thousand six hundred
and here, right, registered bank dots that Heidi. And herein lies the device
idea, you can choose whatever you want. Now click, verify and choose the
location to save your folder.

I also like to save it in the same project that I'm working on. And I create a
code. Colder inside it, so let's call it a cold. Alexei. Now, I would like to
verify to make sure that I don't have any spelling errors, any syntax errors
before moving forward so that I can easily track the errors down. OK, here
we have a serial big in. Now, this is organized from the fact that we are
defining the serial and the idea outside the set up, so let's try them inside the
step function again. OK, now, Duncan. Now let's add analog and digital
input output registers, and we need to agree on one thing regarding the
Reserve Bank. Now, I don't know what we are going to use the Reserve
Bank for. That we created here, that adds, and we will use the 13000 range.
So thirteen thousand one and we write it again. Thirteen thousand to. Now,
if we go back to our schematic, we can see that we have only two analog
inputs, so we need only two analog input devices, which are these two?
Now, this is for analog input. Now, we also need additional output. And we
will do the same, but in a different range, like just supplying the ads inside
it, you can simply write the digital pin numbers. And here we are using
digital output. Go back here. The only digital output that we have is the lid.
And that is connected to the pen of the wire to pin number two. So here we
will add two.
Now, we also have digital inputs. But I just want to add. And for the digital
input, we will use the ten thousand range so that ten thousand three. Now
we have two digital inputs. Three and four now with back here and our
drawing, we can see that it's not two as three digital input and for the
second time, so we have three and four.
Now, let's go back to our code. Now we are done with assigning the analog
input registers and digital output and digital input to the register bank. The
next step now is to assign the device object to the protocol handler. And this
is where the protocol handler will look to read and write register data
currently. And the slave protocol handler may only have one device
assigned to it. So in here, go and like the white slave dot underscored
device. Equals and. And right through this. And this will get the job done.
Now we need to initialize the serial port for the comms at 9600 moderate I
slave dot board. Nine thousand six hundred. Now, the last step is assigning
or setting up the used pens as input and output so that Benmont. And here
you need to change this and put. Copy this, paste it and write it out. Now,
we know for sure that we have inputs and outputs, now the input pen here is
PIN number three and four or our pens number three and four. As you can
see, we have the sensor and we have the button. So three and four are input
pens, three and four. Now, the output is number two, which is connected to
the. That's it. This is everything you need to do in the main or set up
function. Now let's summarize what we have done so far so that we can
move on to the next class on which we are going to program that function.
The first thing that we did is, uh, making sure that we call and use libraries
for us. Then we created the Reserve Bank, which will be used to store all of
the accumulated data. Then we created the most buzz slave protocol handler
and we left an area for defining variables. Moving forward, we assign the
mode bus device idea using that set idea function. And this can be any
number now in the analog and both digital and output and digital input. We
added the values that are just Turpan now. The input is at the three or thirty
thousand range. Digital output is as it is. And our Arduino digital input is in
the 10000 range. Now moving from there we were assigned in this line, we
assigned that mode bastardize object to the protocol handler. Then we
initialize the serial port for communication at the nine thousand six hundred
Boatwright and the last step is setting up the pens that we use as input and
output, transferring this lesson.

OceanofPDF.com
PROGRAMMING
ARDUINO LOOP
FUNCTION
Which is going to proceed with programming arduino, and in this lesson
we'll talk about the loop function. The first step is reading inside the room is
reading the sensor or the analog sensors that are so right. Float sensor one.
Equals Hello, we. Zero. Now, you can name the sensor, but sensors and
sensors can work here. I will just try to answer one. Now we know that we
have two sensors. The temperature on the potential meter I would ride
sensors to now these two sensors usually need to add some delay between
these lines, 10 millisecond is enough. Or let's make it 20. Now, after that,
we need to read and put states for our digital pens to do that right boolean
because this is polling data and let's say a digital one equals digital read.
And the first item that we will read is the state of our third pen, then our
fourth. OK, so the number three, same thing for a number for. Distracter
now. This is digital gold. And to differentiate it from the digital output, our
input here now we need to read from the software that switches or states so
we're right and digital. Output and we know that it's number two, because
we have at number two, we need an equal register and bank. Dr. Gates, and
you already mentioned that set and get functions. And here you need to ride
a PIN number, which is to. Now, we can change the names here, but I will
keep them.
Now we did try to because here we define the output as two. And here we
defined the ad as a tool for the digital output. So when we read it, we need
to read the same pen now. To get better analog readings, we usually use a
function. Now, let's say that we need to get the first sensor. Reinspect. We
will use this method or this equation, we will get the sensor one reading.
And we will multiply it five fold, then we will divide it by one thousand
twenty four point zero. Why did we do this? I will explain it and I said, let's
do the same for the second, Senso. Now we have actually been here until
now. We did this because reading the sensor value will give us a value
between zero and one thousand twenty four. And this is because this is a 10
bit. Resolution. I know this conversation, and if you want to know more,
you can check out a course about our digital conversion. But when you
have a teen birth resolution, ADC or our digital converter, you will get
values between zero and one thousand twenty three. And since we are
getting this value, we need to get it all to convert it to a simpler form, which
is a value between zero and five fold. And to do so first we multiply it with
five or five one zero because it's a float. Five is basically the maximum
expected voltage for the analog input. So here, five volts and multiply a
number by five volts and then we divide it by one thousand. We will get a
voltage value. And I will give you an example.

Let's say that the sensor reading, we use a potentiometer and it went all the
way up to 50 percent of its reading. So it will give us a dimension that will
give us 1024 as a full range and 50 percent from this is 512. So if we
multiply 512 by five to give us two thousand five hundred sixty and if we
divided this by one thousand twenty four, it will give us 2.5 volt, which is
the actual value from the potential meter, because when the potential meter
is halfway through at the zero analog zero, it will give us 2.5 volts because
it's connected to zero and five-fold. I know that this might be a little to take
for, you know, nothing about analog signals. So if you know nothing about
that, you can check our course on analog to digital conversion. But that's it.
I try to explain it the easiest way possible so we would multiply the digital
value by five fold. Then we will divide all of this by 1024 because we are
using a 10 bit ADC, which is basically the resolution. Now you can do other
things when it comes to handling the values, but this is more than enough
for me. Now, what we need to do is to use the Reserve Bank to function, to
write data on article protocol addresses. So write a bank account. That's it.
Inside here, we need the address and here are the addresses that we used.
And we were right, the first value to the first address now here, as you can
see, we have this address for the analog and input. So the value that we are
going to write is actually this value, the one that we took from a one which
is the analog sensor. So write this now we will use the same line. To write
the second address, we will send the second special reading. And. After
that, we need to write to the 10000 address, and we already know that we
have ten thousand three. And for. Now, these two are for the underdog and
these two are for the digital input, so we will send that digital reading,
which is basically this one on. And this turned to. Now. When you want to
send an analog value, we recommend casting it as a word so that the artist
will understand this and casting it. Another thing that you need to know for
moving forward casting is a way to convert one type of data to another type
without having to go through defining variables.
And like writing a few lines. It's just one word, the type of data that you
want to convert this type to between two parentheses and that's it. Now, we
have casted these two values. Now, as you can see here, we dealt with the
digital input. OK, just put. And here we dealt with it. A lot of values now,
we still have one thing that we need to deal with, which is controlling the
digital arduino output depending on the scale switches or the Scarra status
reading. And to do that, we can't simply write an F statement. Now, if. The
additional output tool, which is basically a that we got from Duska
software. We'll check if this value is below or equal to zero and that digital.
Street value. For the very same pen, which has been number two in this
case. Equals equals high. Then we will change this to law. They try to. Now
I'll explain what's happening here in a second, but let's repeat this line. Now,
if this one is above. All equal. And that this started is low. We need to
change it to high. Now, what this will do is the following. Now, if the value
that we got from the scatter software where we have a virtual button or a
graphical button, if that value is below or equal to zero, this means that the
button was not pressed.

So it will check if it was not pressed and if the value is high. And this year
we have an and and so these two must be true for this to be initiated. Since
this one is false, nothing will happen. It will stay the same now. Just to
make sure that you understand what I'm saying, this story, to hear or read
the actual value from our let it will read the status of the second plane to
which that is connected so that it is on and no one pressed the button. So we
have zero from the Scooter software. Then we need to write law or to send
the low value and we won't send low value because here we have an and
and condition. So this is false and this is true. It will stay on. Now the other
scenario is that our lid is off, the street is long, and someone pressed the
button on the graphical user interface. As you can see, additional output to
above or equal one. So the button on the software was pressed. So this is
true and the lid is off. So this is true. Then it will turn that on. And this is
the main purpose of these two lines. If there is often a ton, if there is on,
turn it off depending on the button status on our software. Now, this will be
more clear when we are implementing the scale, the user interface. But
that's it for this lesson now. Now, just to make sure that we have everything
in its place, let's review what we have done here. The first step is reading
the analog sensors value and storing them and your valuables. The second
step is reading the input status for all digital pens or digital sensors and
storing them here. The third thing is reading from Scarra software. Which
status? So we have a virtual switch and we will read status and store it and
this variable. After that, I did an equation to convert the sensor reading from
Raw Data into a vault between zero and five vaults, and you already
explained why. And here we have two statements to make sure that if
someone pressed the button on the graphical interface and Óscar software,
it will change the status of our LEDs. That's connected to my number two.
And here we are sending the analog values using that adjustable bank that
sets a function to write data on all the usual protocol addresses. Now, the
final two steps are delayed, and we are adding this delay to make sure that it
has enough time to send the values. And we are adding slaves that run to
make sure that we are running the slave device. That's it for this call. If you
have any questions regarding any of these lines, I'm here to help this delay
and the crown will repeat the read right cycle, uh, every loop, depending on
the amount of delay that you are placing in here. But that's it. This is our
alduin of code. Now, the last step is verifying the code to make sure that it
doesn't have any syntax errors or spelling errors so that we can fix them
before moving forward. As you can see, Duncan is battling so we don't have
any errors and the cold is ready to be uploaded to our Arduino board.
OceanofPDF.com
DOWNLOAD SCADA
SOFTWARE
I'm going to explain to you how to download and install software in the
software studio. It's the shadow software that you are going to use to draw
our user interface here and right in the software. Now you can write in the
download and you will get the same result. Now you can go to this page, as
you can see. And here we have the software to download information. Now
the software size is a little bit large and this is an unofficial website. It's
called ICP. Does the show as a dot com and sort of download. You can visit
this link from here. Now, you can choose any of these versions. The latest is
The Better. As you can see, it's about one point two three gigabyte clicks
once and your download will start now. It will take less than ten minutes for
this download to finish. So we will wait and get back to proceed with the
installation process.
But not only that, we need to mention going to the official website, which is
in the softwoods that your product downloads at Avivah. Now, here is the
main page. You can click the downloads and tell the download section, now
you can choose a license for educational universities, a student, if you have
a student email, or you can simply click on the software studio to buy the
software. All right. We want to buy, so click download. Now, it will direct
you to this page where you need to register, click, register, and here you
need to fill your information. After filling your information, you need to
enter this text. Click create account. Now, as you can see, my account has
been created and they have sent me a confirmation email. This is the
confirmation email, as you can see now, it's telling me that this is my user
I.D. and they are welcoming me to Abbeyville.
Now, let's go back, click download now, click sign in since we have an
account now and just enter your signing information. Now sign in. And here
it is, this is the software support center where you can download the latest
version of this software and try it out. Now, here we have a lot of sections
simply right in the soft. And here you will find in the case of do. Support
and we need the download section, not all sections. And here we are in the
software studio 20 20. Click once. And as you can see here, it is the same
version that we are downloading right now, I. S 20-20, it's about the same
size, one point two, three gigabyte, and you can start the download by
simply clicking here and here. This is downloaded for the software from an
official server, which is the company's software server.

OceanofPDF.com
INSTALLING SCADA
SOFTWARE
Which is going to uninstall in the soft 20-20 now after downloading the
software, as we mentioned earlier, you will get this device simply by
opening DoubleClick. That set up the fine. And you saw the installation
process.

Now, as you can see, it's extracting the zip file in a temporary folder, so it's
taking a few seconds. A. Now we are done, you will see that set up.
Without. Click Here it is, and the software studio, 20-20. Now click next.
Yes, yes. And here it had a company name. Or any Latouche click next.
Levett. Click next, and here you can choose if you want to add anything
else, mobile access or the import resource, but it's Click next now. And
that's a regular feature that requires both mobile access and its dependency
to be enabled. So click mobile access on time. Click next. Now, let's see.
Now we have this error, which is the fact that we need to install the Internet
information service or I guess now to solve this error, we need to go to a
statement and look for the control panel. From there, you can easily go to
programs. And here, as you can see, we have programs and features now
click turn windows, those features on or off. Now, as you can see here, we
are out of service. What we need is the Internet information service and
Internet information service, hostile work, call click, Select FCP as well,
click, OK, now it will search for the required files and it will download and
install. Now, when it is completed, the requested changes and the close
button click OK again and click next, as you can see. Now we don't have
any errors. Click install on the installation process will start at will complete
space requirements and to start loading the files into our C directory. Now
I'm done with the installation process, click finish, and you have the
software on your system if you want to the start menu, you can easily see in
the software to do 20/20. Now, this is the main window. And as you can see,
it will ask you for a license. And this project will run in very Russian mode.
And you have 14 hours. It will be more than enough for testing the software
and trying what we are going to do in the practical section. Click, And here
it is, this is all user interface, and here we have a PC demo, you can click
file and here the new open project or project file clicking you. And here you
can simply add your project name and further details.

OceanofPDF.com
STARTING A NEW
PROJECT IN SCADA
SOFTWARE
We are going to talk about the software and the software studio. Now after
starting the software, you need to go to file, click, click. And you and he
write an Arduino. And from this list, you can choose the product type, we
are going to do an embedded professional product now choosing different
types will alternate the number of tags that you will get. And we'll talk
about tags in a minute. Now, you can choose the target platform. I will
leave it at all. Let's browse and save it in a location that we know will be
easier for us to do that. Once you are done, simply click, OK? Now you can
choose the resolution for the user interface and by default, it will take your
screen resolution on screen resolution is one thousand nine hundred twenty
by eight or 10 ATP. So click And it will create a new project with the name
that you have selected and as you can see, this is an overview. This result
will help you to configure the new security system.
And you can easily define new user groups and new groups with access
permission to the software. Now, this is not something that we want to like
Tinker at this point and we don't want an airport security system, you can't
enable it and answer that man password. But it's not something that you
want to do. And the security mode is local only. We don't want to connect to
a server or to a client. So leave it at that. You can create more user groups
with different, let's say, privileges, but we will leave it at the default. Now,
they highly recommend that you can figure out a strong password to the
built and guest user. If you care a lot about security, you should go through
these things and create a user group and assign different users to different
groups. But that's it for me. Now click finish. Now, this is our user interface
and this is the screen window now. And the next lesson, I will teach you
how to create a new screen and how to configure that communication
protocol. But that's it. This is how you can open up the software and start on
your project.

OceanofPDF.com
USER INTERFACE AND
COMMUNICATION
DRIVER
We are going to create our very first screen and set up that communication
drive and go to the insert select screen. And from here, you can describe
that screen, let's call it man. Now you can enable a background and you can
select an image and you can see the size, width and height. And you
mentioned that note and how it will be the same as off screen. You can
choose the location of your screen or newly created screen. You can disable
some commands. You can select a background or keep the screen in fine
memory. Anyway, all of these types of things that we can change click OK,
and you should have your screen right here. Now you can zoom in and out
and you can scroll to see everything on your screen like that. Now there is a
view button and a view button. You can click the Phut window to see the
whole screen in one window without scrolling. And this is a very good
feature. Now you can go back here to the insert and you can insert a tag or a
class. And we'll talk about these things in a minute. Now, if you go to the
draw tab, you will see that you can draw a rectangle right here. And then
politics inside it, let's say that you want to write. Arduino scared the system,
and that's it. Now we have our text right here, you can. Increase the size of
that text and you can increase the size of this box and make it fit the whole
window. Now you can add other elements as well. You can. Go to the
symbols icon right here, and from it you can see the system symbols and
you can select fans, you can select motors, pilot light switches and as you
can see on you select switches. You have more than one option. And there
are a lot of switches. Now, if you want to choose one of them, you can't
simply. And drag and drop that switch. Here and here now we have
uSwitch. Now, you're kind of he's the size of that switch. Now, like one of
these switches and place it whatever you want, I can go back to the symbols
and you can add an analog meter for the analog signals. And as you can see
here, we have meters. And we have different indicators, so you can use this
indicator. Now they are loading. It's taking some time. OK, now let's add
this, let's copy control, CNN, control, we and another one, one for the
potential meter and the other one will be for our temperature sensor. Now
we can zoom in and out using the view Fumio. You can zoom into this area
and you can go back several times. Xscape. And you can change the label
with temperature. And here we can change the label with. Change it with
what she stands for, potential meat.

Now, after writing this, there is also another indicator that we need to add,
so let's add other temperatures, the lead indicator, so we have a switch we
have on late and we have a sensor, which is the digital sensor, the motion
detector sensor. Now, let's look for the indicators here. We have icons, OK,
here we have indicators, as you can see, can be an indicator of your aunt.
And here we have pilot lights. I will pick this pilot light and let's place it
down here. And this would represent the state of our sincereness. This pilot
right now, we also have Alberton. So we need to go to a project concert, get
a strong look here, and we can find the bottom, which is a switch. So let's
bring a toggle switch.
Many of these will do that job, then let's pick this one. Now, we have two
indicators for the outlook signals. We have one indicator for the digital
signal and we have a switch. Now, this indicator will be for the bottom and
we need another indicator for the switch. Place down here on the campus
here. And this will be all, but now let's add some text. Now, the text here,
let's call the button and another text here. And let's call it a motion detector.
We can also add another text here and we can call it an LED indicator. Now,
we might edit a few of these things as we go. This is the first thing that we
have to do: click save all to make sure that everything is saved. Now, what
we need to do next is adding the communication driver. So go to insert. And
remove the driver, and from here, look for more buses, press the button on
your keyboard and you will find the mode bus protocol. After you ask, you
see version ten point twelve. So the main thing is this line bus protocol.
After you slash, ask DoubleClick and Doubt's here now. Had the OK button
saved. Again, your work. Now go to the communication tab down below.
And once you are there, click the drivers bus and you will see the main
driver right here. Now, double click on it and you will give this window if
you want to change the properties, you can simply do that by pressing the
bus or would be you and select settings. Once you do that, you will see this
window here, you must choose the composure to which you are about
disconnected, connected here you can control the bits that portray the
patriot bits and the number of data bits. We will leave this to the default
value here. We have asked you 64, no swab by item and unsigned values.
Now, once you have all of these things ready, simply have the OK button.

OceanofPDF.com
TAGS IN SCADA
SYSTEMS
We are going to explain the tags that we need to add to our program. Now.
We need to add tags, which are the addresses of monitored registers and
Aldwin. Such as digital inputs and inputs or control, digital and analog
outputs, the TAGS address wrote, Israel is written as following. First, you
need to write the type, then you need to choose either a signed or unsigned.
Then you need to write the address. So it consists of three things: the type
of data, whether it's signed or unsigned, which is the second tank, and the
third thing is the address. Now Slive others are doing Undermine and the
Arduino code won't just follow the following format from zero or from one
let's say to nine thousand nine hundred ninety nine. It's for digital outputs.
Mus'ab devices can read and write to these registers and from ten thousand
one to nineteen thousand nine hundred ninety nine. As for digital inputs, I
must only read the values from these registers and from thirteen thousand to
thirty nine thousand nine hundred ninety nine. It's for analog puts. A master
device can only read the values from these registers and from fourteen or
forty thousand one to forty nine thousand nine hundred ninety nine is
dedicated for analogue outputs. The device can read and write to these two
adjusters. So let's jump into our software. But before moving forward, just
take a quick look at this table, as you can see, acall status is indicated by
zero X, which is the registered type zero one is for input states, three X is
for input register for X is for holding the register. I prefer that you write this
information on a piece of paper because we will need them when assigning
different tags inside in the software.
So let's move on. Now, to access the main driver's seat or the tax cheat,
simply go to the communication tab and open the driver folder, that would
be the driver's seat and Double-Click it. Now, we will see this one here. You
need to write the tag name here. You need to write the station number,
which is written or Arduino code and already mentioned that we will need
our Arduino code. And there's practical implementation now. That station
number here is five, so right five here for all of our tax. I think that we need
five taxes, OK, now the first thing that we need to indicate is the type of
output we mentioned that three X is for. The input registers. So here's the
address you need, try three X and. Now here you need to write the address
and you can start with the address with the analog pen, which is one, we
also have another input, which is three x two. And this is for the analog
values. Now, three x one and two, which are the analog signals in here. One
and two are stored inside a sensor, one or indicate the sensor nonsense or
two readings. So we will use this indication.
Now, once you add the tag names and so it will ask you for the data type
and. That type can be either interior or real if you have fractions in your
numbers. You can choose any of these two and when you are testing out,
you might change. So let's show the real four now. Now, we also have
Zinser. To. You need to create as well you. OK, now we created the two
values for sensor one and sensor two. Next, we have that digital input and
we already mentioned that the digital input is indicated or input status as
indicated by one. So we need to write one X here. And the PIN number now
for us, the first pin for that digital and put it back here is PIN number three
and four Soboba back here. Three. One X. For us to double check that, we
need to go back to the original addresses and can see three and four. Now,
once we are done with this, we go digital. And put. One. Listen to create a
tag, and here you can choose Bolian or Antigo, since it's an on off signal.
Now we can add another one here. Listen to it. And she booya. That's it
now we have to answer to this, but we still have one thing, which is that
digital output. And it's connected to PIN Number and Scopa and numbers
to. Just to make sure that we have the right person. Number two. OK,
William, and here, we tried zero X. These values have been taken from the.
Tales like to hear are taken from the table that we mentioned earlier. Boulia,
and in that table, we mentioned that zero X is for equal status one, X is four
and status three, X is for input, register for X is for holding register. So zero
X here is for digital output, which is a current state. That's why you are
saying zero X and since one X is for input, state or status, this is what we
are using here. And the input register that holds the data is three X. This is
the indication now. Now, save your work once you are done, maybe a few
things need changing and they're stable. But let's go back to our screen now.

This is the first Arab indicator and we need to link it with an analog value.
So the third name, double click here. And the tag name is sincere. Closet
this one will be forced to answer. That said, now this will be for the
indicator, so it will be. And our project for that digital KLC and port, let's
go back to the table just to make sure we have this talent one and two. So
this one would be for this talent, but one. And this will be all digital and put
to. Now. Regarding the digital output, we can simply double click the lead
and change this. Thanks to digital output too. Now, this is the command.
And usually, as you can see, tax candy, which is the tag tax value, changes
when the switch is toggled. This is the tax state and this is that several states
now, let's say, work again. That's it for this lesson, the next lesson, what we
are going to do is simply, uh, testing the software and changing a few of the
tags and trying to see if it will work or not.

OceanofPDF.com
PRACTICAL
IMPLEMENTATION
Welcome to this new lassonde, unless you're going to do the practical
implementation, now we have our arguing about connected and this is
potentially interconnected to a zero, all the input we have allegedly
connected to a number two. And we have this wired, which is the bottom,
and we will connect it to ground by default. Then we can change this and
connect it to five people. Now, this is a very simple circuit for
demonstration. The first thing that you need to do. Is going to global project
Tagg's. Datasheet view, and from here, you need to make sure that you have
real which is of that type, and we have Bolian or each one of these four
digital pens, and this one is a pen that we won't need. So you can delete it or
change the name not to not use. Now, going back to the screen, you need to
make sure that when you double click here, the tags he and his digital
output to as well must be tagged. State and Axium did the same thing for
both of these digital outputs too. Now, close this. And you have the
software ready, save all.
And we will change a few bad apples as we go in this one, though, we can
watch the variables and see if they are good or not. Click here and right
since then. One since the. To. Now, these are the blogs, Ansel's readings
now, if you went back to the communication driver, right click on settings.
Now we need to choose the serial way that we want to use to communicate.
Now, if there is no silver encapsulation, no modem, not speed, no UDP, we
can simply change that composite. Right. Click on the start menu. Choose
device manager. And from there, we need to know how to support our
Arduino boards connected to Arduino Comm seven. So here right come
seven. Now, Klepac. Next, it's got your Alduin software changed, the part
number to seven and the upload button. Now, it will take some time to
upload the code to our Arduino board. Once applauded, we can muster a
few of these values of these variables to monitor before connecting to our
solar system. As you can see, it's uploading. Now, as you can see, upload
the next step here if you want. To the Syrian matter. Here and here, you can
change the board rate to nine thousand six hundred. Now click again now,
we haven't written anything here to see the values we provide for fuel
cereal. That's right. Since we have the communication on, we can write few,
let's say, lines to write different values to the same amount or so that we can
see fit, carry the sensor data or not. Otherwise you can skip it and just make
sure that we have conserva now closed. Or if you want to monitor the
values before moving to the shadow, which is something I do recommend,
you need to write the following. You go on here. Now, after reading the
value.

Now, if you want to ride data to the settlement or simply ride serial lafrance
alone twice and in the parentheses are the date that you want to write. All
right. So reading and you write that digital input, one state like upload.
Now, once you upload the code to show you are done uploading the serial
matter and you will see the values, as you can see, four point seventy seven.
Now, if I changed the value. With the potential meter, it will keep moving
between zero and five, as you can see. From zero to five. Same thing for
our digital which has been number three, I can connect it to five vaunts.
And you will see that the xylitol will turn to one. As you can see. Now
going back to zero. That said, Now, this was a test so close, this comment,
these two lines. And upload the code again. Now, we are sure that our
arguing board is reading the essential data and essential data is, uh, let's say,
an accurate or correct shape now once. It's done with the applauding part,
we can minimize this and we can start dealing with this user interface. Now
we know for sure that the port is seven thousand six hundred one and eight.
Now click the start button to see if we have any rules that we need to fix.
Click allow access. Now, as you can see, the screen is almost the size of,
let's say, my display, because it has the same, let's say, resolution, and here
we have the scale from zero to 100 for the temperature on the potential
meter. Now, we can close this. We need to change the scale, so it will be
from zero to five. Since I'm using a potential monitor and from zero to five
here. Now click to sign, click, run, and as you can see now, we are getting
values between zero and five. It's about three volts. Now let's move this
potential meter. As you can see, as you move the potential meter, the value
is changing. Now, let's move it back and you can see the analog value of our
control meter is changing back to zero now and moving it to the other side.

As you can see now, this is a thing regarding the analog readings and I have
linked both of these readings. You can't change that, but I have only one
potential interconnection. Now, regarding the digital readings, we have the
button or the machine digital connected to ground, which is zero. We need
to connect it to five volts. So I will take a five volt spin from the Arduino
ball. Hey. Here we have it, it's open. That we have here. And if we want, we
can bring the number to. And place it over there. And as you can see on our
screen, the lid is on. You can easily see that as I'm bringing this close. The
buttons are turning on. Now, this is the motion detector and the but let's
bring them back to zero. Now, the last step is controlling the lid, using this
switch now, as you can see that it is off and the switch is off as once you
click on the switch, it will turn on the left, as you can see here. Now, I'll
turn it off, off, on, off and so on. We can keep doing this all day anyway,
that's it. This is how you can easily create an administrative system with an
interface to control Arduino digital sensors, analog sensors and digital
outputs. Now, it's a very simple thing. If you follow my steps, you will get
the very same results.

OceanofPDF.com
ADDING TAGS TO
DATABASE
Let's talk about tags, tags can be used to display information or to
manipulate screen products or screen objects and to control any runtime
task. So two attacks to your project database, you must go here and right
click, then click and save time. As you can see here, we have a new
window. It's called Object Finder. Now, let's search for M0. As you can see
here, M0 does not exist since we didn't add it yet. So let's create a new right
M0. Leave that to zero since it's the first number, the type of M0, M0 is the
contact that we used to send Abboud's forward on or off to turn on or off the
flash out of zero.
So it's a boolean either true or false, zero or one. And you can choose
whether you want it to be local or server. We want to be local and click,
OK, that's it. This is our name and zero. This is our first double click. OK,
as you can see, we added our very first third. Now, in order to make this tag
useful, we must assign something called in what I would address. This input
output address is provided by the company that produces or manufactures
this p.l.c., which is Delta in our case. So what we need to do is simply go
and search for the input output addresses, file for the tag names, zero
zerozero, etc.. So let's search for a key server for X with ASV, just like these
lines and you will find a file. I prefer Google for searching. OK, click enter.
Now as you can see, this is our project file. Now, let's open that file. To
see.Where these things will go. OK, let me see you that far away. OK, that's
it. This is our file now scroll down until you reach the display or the page
where we have the table. OK, that's it. This is our table. This is the former
boss at the table of Delta TV series, Bill Sea. Scroll down to zero. OK, from
zero to 255, you can see that it's starting with this number, as you can see
the ambassadress. So I'm zero will equal this number. Just click copy and go
to the windows of software and simply click based. But before bursting this,
remove the Zeros and Android zero X, then these two dots and as
mentioned in this table does this is called decimal number. So four zero, it
will be twenty, forty nine for someone, it will be twenty, fifty, fifty one, 52
and so on. So we have the right tag for M0 next thing will we. We will add
other tags. We will add one as you can see here. We want to create that, you
can add right from this display and choose Bolian, then click, You can add
the Y zero here and click and also. You can choose local or several different
things on your knees. Now we need to add the timer zero and the zero,
which is that disaster. So let's start with P0. Placenta, if you want, you can
configure this by clicking here and adding the new or simply going to
insert. E0. Obviously, and as you can see, it's here, then we need to add that
e0.
Which is that at the start and next, we need to take the address of each of
these, I'm zero and one, why zero zerozero? We need to take the address
from the official datasheet, from the company website. So here you can see
the address, which is basically the output address. You need to go to each of
these, just like this Y zero will be zero x 12 EIGHTY-ONE. So you can go
with this one and go here. And at zero X, then the number that you just
covid, I'll add the M1. You can bring these values from each other --. This
one is 40 zero and this one for diesel, that's it. Now, we have then put the
address for each of these and we added five tags with the light and put it out
as if any of this number was incorrect. Urabe, you won't function correctly,
so you need to make sure that you copied the right numbers. And as I
mentioned earlier, if you have one, it will be a 12, 82 y two. It will be 12,
83 and so on. So now what we need to do after adding these tags is simply
at least tax will buy, to be sure all of time that the communication between
the B and C underscore the software. OK, good. That indicates good
communication and no trouble, but bedstead indicates that there is
something going wrong. So this is the spy, one of the best spies. So just add
each of the tags. Double-Click here. And while zero or zero. And I'm one y
zero is zero and finally zero, OK? One needs a zero, as you can see, God, if
I remove the zero, it will be bad since I didn't add it here and my tag list. So
let's rename it to Desu. I chose these tags because my Bielsa software has
zero and one has to zero. Why zero and zero, as you can see here, will
explain this in a security lesson. But for now, you need to understand the
things that you have to do to make the software work correctly at all tasks
that you define to download data, to be monitored all of the time. As you
can see here, we have the log data area here, right click, then click settings.

Once you click settings, go to log tags here and then simply click on the ads
and start adding each of the tags that you just created. OK, I'm one. At
zero.Y zero. You must add all of these tags to the log so that you can
monitor their state all the time, the last one would be the zero. So search for
these little things. It seems like it wasn't edited correctly, so let's have three
of these 00 OK, OK, that's fine. But it's not showing in the window. So let
me check it out. I said I clicked on the tags here, then it appeared. Now I
have all the tags you just need to click, OK, and they are added to the data
supply window and to the output window now simply click, save here, save
all. Next, we'll talk in more detail about how to verify your project and how
to proceed on making your first gada system that will control your delivery.
LC.

OceanofPDF.com
VERIFYING OUR
PROJECT AND LINKING
SERVICES
Now, the first thing is verifying our project, so in order to revive our
project, you need to go to the home window here and simply click here and
verify, verify all the project files, searching for project errors and
optimizing runtime compilation. So click on the verify button then simply
click verify here. As you can see, it's verifying. So the Verify project was
completed successfully. Click. This means that we don't have any errors or
any problems. If there are any, you will find them here. So now what we
need to do is simply go to a project. And services. Now, once we click
services, we'll give this window, which is a services window, and it will ask
us to identify our application and application, let's say, directory or where
we save our application. So click here.
You'll have to go here, here and find this file, which is our database. Also,
you can try to scare the system. Now, once you do this, you can simply
click apply. Configuration completed, this means that you added the
services to your software. Next step will be creating your GeoEye or
creating your screens in which she will display buttons and images. So.
Let's finish this last one with this configuration, we did verification to make
sure that our project has no errors, then we link the services or the service
with our application.

OceanofPDF.com
CREATING AND
CONFIGURING YOUR
FIRST SCADA
INTERFACE
We talk about screens or that you are of our scale, the system, so to add
screens to our program or software or scale system interface, simply go to
insert, then click screen here. And here you will give this window, this
window is showing your properties the size, which is Whitsuntide, the
location where you want the screen to start. As you can see, it will be full
screen for me. And you can enable background and add an image of the
background. You can add the title bar and customize the style. You can add
borders. So as you can see, we have a lot of configurations. I leave these to
you so that you can play with them a little bit. If you have any question
about the unnoticeable qualities, this is my screen. So next thing is adding
items. As you can see, once the screen is selected, you can see that we are in
the graphics tab here. We can add items: rectangle, elipse, line Urtext,
Abberton, push-Button, anything that you want. So I'll go with the
pushbutton here. Let's add our first pushbutton. That's it. This is the push-
Button. Let's add another button here. Now, let's add a lump along the Bush
button is basically a way to send data or to intervene both to the B and C
using our Skarsgård interface, that is an indicator, our output indicator.
So if Y zero on the wealthy is on, we can turn on a lamp here on the Scarra
system to add lamps, simply go here to the stub graphics and then head to
symbols. As you can see here, we have system symbols and we have violet
lights. Here we can find violet lights. You can choose any of these or you
can view all of them here and go with this one, as you can see. This is our
pilot light, so we added two buttons and one pilot light, as you can see, two
inputs and one output now in order to configure each of these items. We can
simply double click on this item. Will give this one, though. And as you can
see, we have a and a value and the target date is the probability. While the
value is being slow, we need to change this with a double click here. We
wanted to display the state of why zero so we can simply search for why
zero. And it's here. That's it. You just need to click on the exit and you just
link this lamp to zero. And we all see again, you need to have all of the tags
or the input output addresses written correctly for this to work. Now, since
we're doing this to zero, we need to go to the text buttons and change the
tags. The first one we wanted to control. Let's say we want to control. The
Amsel. Since we added M0. Can click on configure and search here or
configure these captions on how the button will lo But you can simply do
this right, M0 here and everything will work correctly. After this, you can
simply close that window and move to the next button. But if you want, you
can configure the button itself. And right here, the Worldstar, since this will
stop the flesher. After that, you can simply close the window, go to that next
one right here or simply. I'm one zero and he writes Taube. And here at St..
Now, we can't figure out the two buttons that we just added and we can't
figure out the number that we added. What you need to do next is simply
change, let's say, the colors of these two by double clicking here,
configuring and changing the color from here. Let's say we want dark red
for the stop button and you can choose or choose anything that you want for
this configuration. Let me move this down and add a textbox Let's name it
first, the project, the all star all see. Now you can double click here and
align the line that extra center, chair the font to a large ball 16. As you can
see here, you can change the probabilities and you can add anything that
you want. You can even add a text box here. Since we linked the numbers
that e0 to this text box, we can add not one, but two text boxes. This is the
first one. And let's add another one. This is the second one. So in order to
change the realities, you can simply double click on that textbook and the
tag solution, which is zero in this case, then close it and move to the next
one. And that is zero here to zero. These will display the number. That will
exist inside zero and zero tags and that we all see now, this is it, we just
created our first reality program. We can do this down here and we can
configure them with labels. Let me click on Save All and Save the Screen.
Now, let's move this up and use labels. Let me copy this and this that here
let's right here. C0 or Bleasdale here. Indicate that this will simply be zero
state and let's add to zero here, so zero. That's it. This is our first project.
Now what you need to do is simply hope that we all see and run this
scareder project and let's click here to run the results. As you can see,
around five start all the long time tasks for the selected project. Now, once
you run the software, you can simply see that when I start, it will go. Since I
didn't read Collectability, it will show this message. You can simply click,
start and will enable this y zero to turn on and off. It will turn off this Y zero
in the next one. I show you this in practice or practical work, how to hook
your policy to your computer, what you need to configure and the
communication settings that you need to set for the ability to work
correctly. But that's it for this lesson. We just created our first garage project
using Delta p.l.c.. And in the software.

OceanofPDF.com
HOW TO DOWNLOAD
AND INSTALL WPLSOFT
I'll teach you how to download and install all software, which is the
software to be used for programming. Delta Beatles'sLet's start by going to
Google and it will be outsourced. Go with the first search result, which is
the latter. OK, it seems that there is a server error. Let's check the second
link. OK, now. We have the customer service section and the download
center. OK, this is the official Delta website. They provide software for free.
You just need to check your settings, industrial automation, then go here
and choose p.l.c.. Now you can choose the p.l.c., which is in our case, the
CBS series. After checking this one. Check the software and click submit.
As you can see here, we have documentation, software, programming
manuals, everything, we just need this one. We were all software and two
point four six. If there is a newer version, when you open this page, you
need to download the newer version. But this is the largest version at the
moment and go and click on the zip file. It will start downloading, as you
can see, it has only one extra file, so as you can see, it will start to take a
minute to download. They provide the software for free and their official
website. So you just need to go and know where to go. As you can see, this
is their website, Delta W-W dot com services download Sinter to the SBX.
This is the official download center where they provide free education for
all free educational software and free documentation for their products. So
this is the p.l.c. in our series Software Web page. And as you can see, they
provide a lot of software. Let's take a quick lo
You can check from here and download the operation manual application or
the installation instructions. You can also download dimension's
certifications, electrical barometers and catalogs, if I click submit, the page
will be refreshed with the new items. As you can see here, we have the
catalogs. They are in English, Portuguese, Spanish and Russian. You can
download the catalog and see what's inside it. Here we have the cables and
here we have the software, the motion controller, the communication that
rivals and we have software tools to start smart viewers. And this one is for
monitoring just hours of data we all see and General Motors devices on an
Android device or from your mobile phone, you can monitor the status of
the data registers. We have a starter kit. We have an operation manual.
These are very, very informative, believes the p.l.c. application, manual
programming. You can download it, you can check it out. It will teach you
how to program delectably L.C. From zero to hero, so. And as you can see
here, we have dimensions depending on the type that you have at hand.
They provide a lot of information for free. You just need to buy shares there
p.l.c. and they will help you start programming. They will help you with the
free software you need to buy anything. OK, now we have the software.
Just click open and double click on Will. We also set up that easy and then
just click next.
Next, It's a very simple and straightforward process. Now click next, next,
next, next. So since I already have the software and didn't do it fast, just
click finish to start and you'll find it will be all soft. Again, this is its icon, X
and Y tricolors. We ban soft drinks. OK, now let's create a new five. And
here you can set the program title, maybe I'll see that I can select it here, the
communication settings, if you are connecting to your computer, you will
see the settings here. You can change the board with the board for the B and
C, and you can choose A filename. Next, we will start programming the B
and.

OceanofPDF.com
PLC PROGRAM TO BE
CONTROLLED BY SCADA
Will program, or we'll draw our first program for the B and C, and we will
make that program in such a way that will communicate with an eye that we
just programmed in the previous lessons. So let's start by opening. The
software will be soft. Let's start by creating a new project file, a new
program titled A Sham I Love Related. Problem, we want the same
filename down here, here, choose whether you want to be LCB, FDA or
T.B., we want to be Alsi. It's from a series, so select us and choose the board
if you have the B and C connected to your computer. But since I don't have
it connected here, it won't show up here. OK, now let's go back click, OK?
That's the ladder diagram and that's the instruction. We want to use the
ladder diagram. If you don't know what Ladder B Chicken or B and C
programming courses are, search the education engineering team on the
Udemy search bar. So let's start. Uh, I added an M0 and that's um I uh. And
add, um, one, we will add these two for the scatter system. So let's start by
running a software that when I press the button or when a pulse arrives to
zero, it will set, um, to add about our lives to um one. It will set um two and
um two will turn on a flashlight on y zero. So let's start by drawing. The
first, uh, which is, um. Zero. But since I'm using apples and what I want to
use the balls so I can change this to only be. Then I want to set it up so you
can draw, all right, and so I'll use both. I just drew using this icon and I
wrote Setanta, you can write it if you want. I'm one LDP, and I will add it
here. Instead of clicking on these icons, you can use these little instructions
called Marnix. Now we want to reset AMTA. That's it. As you can see, if
you want to learn how to do this, you can check out our p.l.c. software
course using our YouTube profile. OK, now we want to add, Ali, and to that
said, this one, when you initiate a time since we want to make a flasher, so
we'll at the time Altium are desirable, desirable. After that, we want to make
a branch. So let's click here. We want to outweigh zero. This is OK with me,
right, y zero, this is the problem that will turn on and off depending on this
time of year, we will want to add a timer and timer also. We'll add another
line here, Theama, to you on this. So let's talk about the software that we
just wrote. If you want this time to work, we need to add something here.
This time will count until it reaches zero. Whatever the value and the zero,
then it will turn on Y zero after that will turn off. Then again, it would
repeat itself until we press on one which is set up to and turn off this. So we
need to add a T1 here. Which is, in this case, LDI, do you want? Here, I
want to add at e0, so LDI zero here. We want to add a little easier, which is.
Normally open, these two are normally closed, so let's combine, then
explain what we did. That's it. You just need to compile the data instruction.
Now, when we send apples to M0, it will set up to watch interns. Let me
zoom in here. So hundred and fifty, let's zoom in again. OK, now I think
that this is clear. Let me show you. What is done here when we send a
ballsiest to M0, it will sit up so I'm told shows here once and to close and
since these two are drummy close, this will turn on and this will count. Let's
assume that that e0 has a five seconds and five seconds value here. So after
five seconds, p0 will be Orbin here. So this one will no longer exist. So zero
will turn off. But will activate what activity one sortie, one will count until
five seconds after that, T1 will deactivate this. This time, so once T1 is
deactivated and this is Orben, timer zero will turn off, which entails when
the activity is two, so they will get back to their original state of turning on.
So here these two lines are on. Then there is the use of these two lines.
Otherwise, there is the component that intersects between two of these, so
Taimur Zero will turn on Y zero for five seconds and after five seconds time
or one will turn off. That's on. Tomorrow, turn the zero for five seconds. So
that's it, this is how the flushable will turn on and off depending on the
value of the zero, which we will set either using ayahuasca or a system. So I
think that this needs to be explained one more time. Let me. Remove these,
OK? OK, again, if we want to add, let's say here, if M0 is a breast and two
will turn on, so I'm too close here, it will turn on for five seconds. Dawai
zero since these are my clothes and after five seconds to zero and close this
and all this. So once this is closed and this is Orbin, then this will be off.
And this will count until it reaches five seconds, after five seconds, it will
return to this. As you can see, this will be normally open. So it will turn off
this time and this time at once. The end of it will be the process again. So
these two will turn on and these two will turn off on, off, on, off, on, off
indefinitely until we place them one which is blessed using either I ask
system to reset to ones and twos restored. No, none of this will turn on. This
area will be off. So I'm one one bolthole. I said I will be off too. Again, this
is one way to make a flasher, you can make a flashlight using other
methods. Now let's see this program in action. Let's try to run it. OK, we
don't have a B see? And. I'll run the software using a C in the next lesson,
but for now, if you have any questions regarding how this works, please ask
in the current about. But again, if this is not clear and once I'm on when we
click zero I'm two is. So it will close this. So these two will be on since here
and here we have known my close contacts that I will count for you for five
seconds and why there will be on which is the dallam. Now after five
seconds the timer zero will activate the timer once the timer runs. Activated
timer zero will deactivate Y zero since it counted five seconds and it's called
it's still on.

So one zero will be off and T1 will be on the one count five seconds and it
will get easier when we reset zero it's called will be off and its effect on
these lines will be gone. So will counting for five seconds and Y zero will
be on after that. After five seconds, it will turn off by zero and turn on the
timer for five seconds and the process will keep repeating itself. Five
seconds on and five seconds of another way for making one millisecond
timeout. One second time off is using special auxiliary contests such as, um,
one thousand thirteen. I will talk about that and later lecture. But for now,
that's it, this is the software that we will use to control Akamai or scare
systems. This will be downloaded to be alsi. But first you need to go to
transfer, set up and choose the cereal board from here on your collectability.
After that, you can simply go here, as you can see on this icon, and click on
Right to be Alsi or click control and after menu.

OceanofPDF.com
PLC PRACTICAL
INTRODUCTION
introduce you to B and C, which means programmable logic controllers.
And the one that we are using in our explanation and in this lesson is Delta
VLCC. Its number is, as you can see here, D.V. B 32 s. Let me take you on
a quick tour to get you ready to use this p.l.c.. Let's start by the basics. As
you can see here, we have three buttons, power one and all these three are
used to indicate that the first one is indicating that if there is power, this lid
will be on. If the B and C program or software is running, the run will be
on. If there is any room that it will turn on now. And this area, as you can
see there, is in and out. As you can see here, the M has number zero one,
two, three, four, five, six, seven, then 10, 11, 12, 13. So we have to have
eight by two, which means 16 and what. And 16 outwell. That's why we
have 32. Yes, it's 16.
And what plus 16 output equals 32 years. Now, as you can see, we have two
circuits, one right here and the other one is right here. This one is for
extension units on the right side. While on the left side, we have this one,
which is for programming or for interfacing with Akamai. So it's called R
US two, three, two boards. Now, we have to let me show you these two.
OK, we have this and we have this one. Let's start with this one. As you can
see here we have and let's start with this. We have our then and then I do. A
lot means that this bin will connect to nothing. The line, Andrew, and you
would run out of both voltage for the B and C, so it will take two hundred
and twenty volt AC. Then we have these spins, outer bands plus 24 x zero,
one, two, three. These are the inputs and extend to x 70. And these also of
these are the ones suffering from Al and ending with X seven and the one
below are for the ground to x 70 as you can see. So we have two rows here
and two rows of screws here. Now, as you can see in the second row, we
have the ground, then we have a band that connects to nothing. Then we
have 20 for the ground. And as dash as we will talk about this on
programming and we have an input, this as the US is for. Let me show it to
you. That's it, it's called. US. On us, this one is used for basically it's the
common for all of these inputs. Now let's talk about the output side. OK,
let me unplug this. As you can see here, we have the very same thing to
laws and to laws starting from zero one one zero one two one, two, three.
This means that while zero one one one, two and three are hooked up to see
zero zero is the common for all of these four output's. Then we have C one,
which is the common four. Why four to five and why six and seven? Then
we have Wighton y 11 like 12 and 13. C two is the common for these and
the side we have the R US, as you can see here are four eight five A plus
and minus Y of these two words are connected to the R US four at five.
Basically it's used for Atami so you can connect it to are using these wires.
Now if you want to know more specifications you can check this. As you
can see the model is driveby 32 s zero zero two and we have our input and
output. All the more input is from 100 to 200 faulty SC 15 to 16 Hertz and
Three-fold and Bernhardt's.

Why the output you can hold can withstand up to two Ambre 250 volt AC
this load, which means the resistive load, as you can see here. And here is
the phone number for that p.l.c.. If you want to give the Dallasites or if you
want to download any other information. Now at the bottom, we have two
sockets to hook this p.l.c. to. And Omega Bosz, as you can see, these two
are used to hook it up. OK, that's it for the Bielsa introduction, as you can
see here. Next, we'll talk about more details. But for now, that's it. This is a
quick introduction into B and C, the LC. This is the input side and this is the
output side.

OceanofPDF.com
SCADA PRACTICAL
IMPLEMENTATION
I'll show you how you can easily and effectively interface as Canada or in
the softwoods software or the application that we just created in the
software, this policy. First things first, you need to know this are as two or
three to cable to this p.l.c.. So open this policy blog and make sure to
HOGGETT. Let's say, as you can see here, we have a lot of tools. So you
need to make sure that all of these pens are not ruined once you hook them.
So I try to hook them the right way. OK, everything's OK now, I did OK,
this baby, I'll see to my computer and the software is running. So when I
press on the first button now Elbrus on the first button, as you can see, it's
10 and zero on and off. So it's basically a flash of software. Now, I'll press
the second button, which will turn off this WI zero depending on our p.l.c.
application that we create and the previous lesson. So let me click on that
on the software. As you can see, it's now off. So this is it. This is how you
can help your policy to your computer and how you can control it using a
simple Escada system created using underserve software, just like I taught
you how to do it in the previous lesson. Now, you might face a little
problem if you are using a laptop since let me on this show you what I
mean. What I mean.
OK, this is it. This is the other end of the table. So it's basically us two three
to the old cable so it won't work with your laptop. So you need to buy or
buy this cable. It's USPI to ask two or three to cable. So basically I plugged
this to my laptop and this thing I plug into this cable, as you can see here.
And everything will work like a charm. Now you can create any software.
You can monitor and censor any input and output, and you can enter any
input that you wish right from your computer screen. This is how to
automate the process of using p.l.c. using endo's of software.

OceanofPDF.com
INTRODUCTION SCOPE
OF LEARNING
Welcome and thank you very much for choosing this course in this Arduino
beginner's guide. You will find an introduction to the use of the mini PC
Arduino in theory and practice. I, as an engineer, will share with you my
knowledge from study and practice step by step in this course and this
course aimed specifically at beginners. You will learn all the basics you
need to know when working within Arduino. We will work exclusively with
the Arduino Uno in this course, as it is ideally suited for beginners. In brief,
this course will teach you the following in detail the basic terms and
components of electrical engineering as background knowledge structure of
an Arduino Uno board and how to use it.
What is the Arduino I.D? What is it used for and how is it structured?
Programming basics block based programming. Programming bases. Text
based programming. How to create a system with an original. And how to
write the required program code. Hands on learning based on exciting Do-
It-Yourself projects, as well as signal with leg temperature based on the
decontrol light dependent control of a motor.Gas detects an alarm.
Password protected system, remote controlled system and much more. Be
excited. Let's go.

OceanofPDF.com
FIRST STEPS WITH AN
ARDUINO
Arduino is an electronic platform consisting of hardware and software that
is very user friendly and was created as part of an open source project. The
term open source is generally characterized by the fact that software is
freely available. Active participation of users is desired and there are no
restrictions on use. Simply put, an Arduino is nothing more than a small and
very simple PC or microcontroller that is capable of taking input signals,
processing them internally and then converting them into corresponding
output signals.
An input signal
could, for example, be sunlight falling on the sensor. The corresponding
output signal could, for example, be controlling a motor. This mini PC can
be purchased in the very poorest appearance of a circuit board equipped
with electronic components either individually or as a set. There are
different arena boards, modules and beginner sets. The following Arduino
boards are recommended to get started with. Arduino, UNO, Arduino,
Nano, Arduino, Leonardo Arduino, Micro, a good overview of all products
and the way to order them can be found on the official website. W w w dot
Arduino Dot CC you can either buy the Arduino products we need in this
course via this official site or buy them via Amazon or eBay, by the way,
and Arduino Uniport is available from about $20. Complete starter set from
about $70. In this course, we will mainly deal with the Arduino UNO board
and use it for the projects. We will also need other components such as
LEDs, resistors sensors, for example, infrared sensor actuators, for
example, a motor for the project. Which components in particular are
needed? You will find them the further course, and in each project clearly
listed for this, it is recommended to buy the so-called Arduino starter kit for
beginners.
Or also another start to set or in addition to the Arduino Uniport also sensor
or a module set, which contains the required components in order for the
mini PC to know what to do with the previously mentioned input signals
and what output signals, we would like to have the Arduino board and its
instructions. These instructions for the microcontroller are given by the
user. That means by us. Thanks to a program code. Programming language
is used for this purpose for programming and transmission. A special
software is used, the Arduino software IEEE. This software can be
downloaded online free of charge, for example, at Arduino Dot CC.
Countless projects have already been realized with the Arduino
microcontroller, and this mini PC is suitable for hobby projects for
prototyping or even for scientific projects. The Arduino community is
spread all over the world. It includes students, engineers, hobbyists, artists,
programmers and so on. Millions of users have contributed to this Open-
Source platform, and thanks to these contributions, a lot of knowledge has
been accumulated to help professional and new users with their various
projects. Adreno is specifically designed for users who need a simple and
inexpensive platform for electronics and programming projects. Since
Arduino is an open source project, users can change anything they want or
customize any function according to their needs. Why choose an Arduino?
There are also other microcontroller platforms and competing products,
some of them that are similar to Arduino are called, for example. Basic step
by parallax beaks 24 fi and handy board. And there are many other boards
with similar functions. However, these microcontrollers use quite old
fashioned programming methods. The community is not as large as for
Arduino, and the instructions are not so easy for newcomers. The following
is a brief list of why Arduino is so great and why you are right to choose
Arduino and this course at a reasonable price. Arduino has a fair to a
reasonable price, and this is one of the main reasons for its worldwide
success. The Arduino Uno board, for example, is already available for
around 20 bucks. Cross-platform, as with many major platforms, most
microcontrollers only work with Windows. They lack support for systems
like Mac and Linux Arduino. On the other hand, it runs with all systems
easy to program. Probably the most important point. An Arduino is
effortless to use and program the software for it. Arduino IEEE is very user
friendly.

This helps especially beginners, but also young people or retirees to get
familiar with the program very easily and playfully. Nevertheless, Arduino
also offers the possibility to perform complex projects and programming, so
it is also a great platform for advanced users. Open source software,
everyone can contribute to this great project. Every user can create new
libraries. We will learn later with business and make them available to other
users as well. Open source hardware. The Arduino hardware is also open
source and can be modified by any user through a kind of blocking play
system and through a so-called Brett board. Modules can be added in a
variety of different projects and can be implemented. It is a kind of modular
system.

OceanofPDF.com
INTRODUCTION TO
ELECTRICITY AND
DIGITAL ELECTRONICS
Before we go into detail about the Arduino board and the Arduino software,
let's first take a look at the basics of electricity and digital electronics.
Electricity is created by electrons flowing from a place with higher
potential, higher energy to a place with lower potential, lower energy. It can
be relatively well imagined by means of a waterfall. The water represents
the electrons flowing from the top point of the waterfall. High potential
high energy to the bottom point of the waterfall.Low potential.Low energy.
The potential energy is transformed into kinetic energy during this process.
That's why it loses this energy state in the process. But actually, this energy
is transformed, as said before. Similarly, the electron wants to flow from a
place with higher current, high potential to a place with lower current, low
potential.
Voltage is the unit of electrical energy generated by the battery, the battery
or any other voltage source has two terminals. One terminal is called the
negative terminal and the other terminal is called the positive terminal at the
positive terminal. The voltage potential is higher compared to the negative
side. Thus, the current flows from the positive side plus pole to the negative
side minus pole. Considering the technical direction of current. You can
think of a battery or other power generating source as fun functioning as a
pump. A battery, for example, generates voltage or energy through an
electrochemical reaction inside this voltage or energy flows out of the
positive pole in the form of electrons. These electrons symbolize the water
molecules that are pumped out to compensate for the lost electrons.
The battery, similar to a suction pump, draws the same number of electrons
back in through the negative pole. What is a circuit? Simply put, a circuit is
an arrangement of different components, with an electrically conductive
connection between them for an electrical circuit or a circuit to work. You
need an energy source such as a battery and a load, such as a light bulb, as
well as connections between these two components, which are called
conductors in electrical engineering. These components are represented in a
circuit as the following symbols. For a lamp, for example, to light up, as
shown in the following figure, the secret must be closed. That means there
must be a connection between the two poles plus and minus of a power
source.For example, the battery and the lamp. If this is the case, current
flows from one pole of the power source, for example, the battery through
the lamp and back to the other pole of the power source. When this
connection is severed, for example, by a switch, current no longer flows and
the lamp no longer lights. In this case, it is called an open circuit.
A short circuit occurs if the current can flow from one pole of the current
source to the other pole unhindered and without first passing through an
electrical component, for example, through an uninsulated spot of a cable
on a metal surface. This is because the current always takes the path of least
resistance. A circuit diagram is the basic concept of a circuit that can be
drawn, for example, on a piece of paper or with the help of a computer
program. Such a circuit diagram can also be made a bit more descriptive, a
bit more descriptive. Circuit diagrams for the Arduino can be created at
best, with the software from freezing torque, which can be downloaded at
the given. You're all for little money. As Fritz's dot org, you can also find
many references and instructions for using the software. As we can see on
the picture in this project. For example, a relay and the module are
connected to Arduino Uno wire colored cables. The colors of the wires each
have a meaning that helps to make correct wiring. In this illustration, red
wires stand for the five volt signal and all black wires for the ground signal
zero one.

OceanofPDF.com
IMPORTANT
COMPONENTS OF
ELECTRONICS & DIGITAL
ELECTRONICS
In this chapter, we will deal with the basics of electronics, a minefield of
electrical engineering in particular. We will take a closer look at digital
electronics. Pieces of digital electronics are simple switching operations.
The computer is one of the best examples of these switching operations and
of digital electronics. The applications that a modern computer enables us to
do are achieved thanks to switching operations performed by millions of
transistors. So what is the basic principle behind the PC? Surely you have
heard this before. It is the so-called binary system which is based on the two
numbers zero and one. Communication and digital systems take place with
the help of these numbers or with the help of various combinations of these
two numbers. Since the Arduino is basically nothing more than a very
simple and stripped down mini PC, this principle is also applied here. The
true binary numbers are mostly represented in today's electronics systems
by the voltages five fold, one or high value and zero zero or low value.
The restriction to only two numbers or voltage values seems to be very
limiting, and it is very hard to imagine how a PC can achieve today's
outstanding performance. Based on this system, however, this system and
its simplicity makes sense. It simplifies the matter because it is extremely
simple to recognize these two states. That means zero or one and two
definitely distinguish them from each other. A diode is a semiconductor
component in electronics, but has the property of allowing current to flow
in only one direction for which direction the other direction is blocked for
the current flow reversed direction. You can imagine a diode simply like a
valve. The simplest application of a diode is the leg. The LED light emitting
diode is a semiconductor device that produces light when it is energized.
The light is produced by current flowing from a DC source to the diode and
through it. Since then, LEDs are a semiconductor device. It also has a
forward direction. This means that current can only flow through it in that
direction. If an is connected incorrectly, no light will be produced. The
color of the light and whether it is visible or not. For example, infrared is
controlled by the doping and material used. Two major advantages of ladies
are a long life. B, low power consumption compared to old fashioned lamps
and lady can achieve a lifetime of several 10000 hours and has many times
better efficiency. Why is that? Conventional light bulbs produce an
enormous amount of heat in addition to visible light, which means that the
energy expended is converted not only into light but primarily into heat.
With LEDs, only a little heat is produced as a waste or byproduct, and
almost all the energy can be used to produce the light.

There are now different types of allergies. The simplest design is shown in
the scented image. The heart, and also the actual semiconductor element of
the energy shown is the tip, which is placed on the reflector, on the anode
and amidst the light. The circuit symbol of an energy consists of the diode
circuit symbol with two additional slanted arrows, which are supposed to
represent emitting light. Transistor is a simple three terminal component
that can best be thought of as a wealth that controls the flow of water in a
pump. For example, if you turn the control of the wealth in a certain
direction, that means open water flow increases. And if we turn it in the
other direction, that means closing the flow decreases the wealth. In the
case of the transistor would be diets, and the water would be the current
electronics and generally simplified has a lot to do with switching elements,
and transistors also behave like switches. In addition to this switching
capability, transistors also have the property of amplification, which would
be equivalent to changing the welfare issue for the amount of water output.
This amplification property is particularly important in the world of
electronics.

There are several types of transistors. One of the simplest being the bipolar
transistor. Furthermore, there are, for example, the field effect transistor and
the metal oxide semiconductor field effect transistor. All types of transistors
have special properties and are used in different applications. In simple
terms, a capacitor consists of nothing more than two plates arranged parallel
to each other and the dielectric between them, a dielectric is simply a
weekly or non conductive substance. Solid liquid gas with charge carriers
that are not free to move capacitors are generally considered charge storage
devices because when an electrical potential is applied, they can store
voltage energy in their plates. The ability of a capacitor to store charge
depends on the area of the plates.
The spacing and the dielectric between the plates. This ability to store
charge is typically referred to as capacitance as the charge and the plate
increases. So that's the voltage of the capacitor. And this continues until the
capacitance is reached. Resistors are components that can be used primarily
to, as the name suggests, apply resistance to something. In this case, their
sister acts against the current and can be used to limit the flow of current
into a component that is connected to the resistor. Basically, every
conductor has a resistance that can be calculated depending on its length
and cross section. In our case, we use so-called sheet resistors. Here, for
example, there are the carbon former sisters and the metal, or also metal
oxide foam resistors with these types, the resistance while you come from a
Karami core with a layer of carbon or metal or metal oxide, the resistance.
While you can be measured either with the help of a multi meter or directly
on the resistor by means of the colored rings, each resistor has a color code
consisting of five rings that reveal the resistance. Whether you read this
color coding must be explained in detail and would therefore go beyond the
scope of this chapter. After all, we want to work with the Arduino as soon as
possible. You can either look up this coding online or bust a set using
moved the meter to measure it. In electrical engineering, multi meters are
often used as measuring instruments, multimeters with two terminals and
measure voltage current resistance, capacitance and inductance. But you
can also measure the polarity of transistors and perform a continuity test
with it. They continued to test us on whether a circuit is shorted or not.
Multimeters can only measure one variable at a time, such as current or
voltage, to measure multiple parameters. We need to use several individual
devices. The figure shows a simple multimeter with the different measuring
ranges, depending on what you want to measure, you turn the dial to the
appropriate range when taking a measurement always taught from the
highest possible voltage or amperage. To the highest or the highest
resistance value and then turn the display setting down until a suitable value
is displayed. This means, for example, that if you make a measurement on a
DC voltage source and you suspect that whether you're between 20 and 200
volts, you first turn the setting range to 200 watts and then downwards.

If you want to miss measurable pitch, you have to connect the measuring
electrodes parallel to the voltage source or to the component you want to
measure. As for a light bulb, for example, this would work like this. And if
you want to measure the current, you have to connect the measuring
instrument, the multimeter in series to the consumer. That means disconnect
the line. Perhaps you have heard the term embedded system before, perhaps
you have also often wondered what it actually is and what it is used for. In
simple terms, an embedded system describes the presence of a type of
computer in a technical system or on a circuit board, as in the case of the
Arduino that carries out signal transmission or data processing of input and
output signals. This processing is done by a microcontroller which is a tiny
computer. This microcontroller is designed to perform certain functions,
and it's basically nothing more than a tiny computing system consisting of a
semiconductor chip. You can program the microcontroller using PC
software to perform operations.

As an example in the figure, you can see a system controlled by an Arduino


Uno, the system switches the power of two devices, air conditioner and
electric heater, depending on temperature and time during off peak hours.
Data is obtained from the utility company. It tries to match the electricity
bill with the room temperature. A budget limit for the electricity price can
be set with a potential meter. Are we one? It also attempts to turn the air
conditioner on at night and off during working hours six days per week. In
this secret, the temperature is measured using three five temperature sensors
and displayed on the LCD. In this complex system, the Arduino switches
the air conditioner and heater by matching the temperature, time and power.
Three parameters This example should only show what is possible with an
Arduino and that even complex systems are possible. Of course, we will
start much simpler in one of the following chapters and learn everything
step by step. So do not be afraid. The system can be a stand alone system,
but it can also cooperate with other systems to perform a common task in
every embedded system. There are circuits that perform the functions and
send or receive instructions. That means transmitting data in the form of
voltage. With the help of conductive elements in its simplest form, an
embedded system consists of the following core components: processor,
sensor actuator and an analog to digital converter, as well as a digital to
analog converter. We will look at these components in a little more detail.
The further sensor is a component that can convert physical changes in the
real world into an electrical signal that can be used by a computer or
electrical system to process data. Think of it like a human's sensory organ
with the help of eyes, ears and other sensory organs. Our brain can interpret
the outside world and thus create an image of it. And similarly, you can
imagine it with computer systems. In this example, the sensors would stand
for the sense organs and the microcontroller for the brain. The electrical
signals coming from the sensors to the microcontroller allow the embedded
system or the microcontroller to interpret what is happening in the outside
world and then execute a response or program given by a programmer for a
scenario by means of code. Another important component of an embedded
system is the analog to digital converter. This converts the analog signals
sent by the sensors into a digital signal for this purpose, as we already know
by now. The binary system is used. That means the two numbers one and
zero. These binary numbers represent the language of the system in which a
microcontroller can understand and react. The difference between analog
and digital signals is, among other things, that an analog signal can be the
carrier of several pieces of information. Whereas with a digital signal, one
can assign a unique piece of information to each signal and analog signal
would therefore confuse the microcontroller. To put it bluntly, processors
are the heart of any embedded system. A processor performs all tasks
related to the received data. This component therefore receives data that
stores it, processes it and tells the system in what way it must react to this
data. A digital to analog converter is basically just the opposite of an analog
to digital converter. It converts the digital signal sent by the microcontroller
back into an analog signal. So why is that digital signal converted back to
an analog signal? Simply because an analog signal can be understood by a
physical device or actuators? An actuator, for example, an electric motor
converts the analog signal received from the microcontroller and the digital
to analog converter into a physical action.

There are mechanical, acoustic, chemical, thermal and optical actuators that
can perform physical actions in the real world, according to their design.
This is how embedded systems interact with the environment. From this,
there are a few steps that we need to take when creating or designing an
Arduino system. First, we think about what task our embedded system
means that our DNA should perform, for example, raise the blinds when the
sun rises. Then we think about which sensors we need for this. For example,
a light sensor. In addition, we need to think about the program code for this
task. Don't worry, we'll get to that and we still need an actuary to perform
the task. For example, a motor. Of course, we also have to build the board
with the components, according to a previously considered secret.

OceanofPDF.com
THE ARDUINO BOARD
(HARDWARE)
In this chapter, let's take a look at the hardware. That means the board of the
Arduino, each pin of an Arduino board is marked with a number or a label.
The board works with five involved in what follows, we will look a little
more closely at the components of an Arduino in this case, the Arduino
owner. We will now take a closer look at some of the most important
components of the Arduino board. Step by step. Digital pins can supply a
five voltage or zero volt similarity. This can also detect whether a voltage is
present at the pin and whether this is five fold or zero, logically. The latter
is the case when there is no voltage. You can define in our program code
whether opinion should be used as output or input. We will see how this
works later. An internal already is connected to 13 of the Arduino. This
ADT can be useful in many situations. We will deal with it again later.
Another lady is connected to the power pin to indicate if the Arduino is
receiving power. The eight mega microcontroller controls the board,
controls all input and output signals and serves as the digital control center
of the Arduino. It is the processor of the board and later also contains the
program code transferred by the user.
Five analog pins and a look in are used to read analog voltage and convert it
to digital voltage. This is done with the help of an analog to digital
converter, which we have already learned about. The two pins, TNG and
five volt are used to supply power to the circuits in a project. The 3.3 volt
power pin is also a valuable key in the stands for ground, which is the
negative terminal of the board. The board can be powered by a USB cable
or power plug. Arduino can work with voltages from five to 12 volts. In no
case should a higher voltage be applied. But two pins labeled ticks and risks
are connected to allergies and indicate when communication is taking place.
That means whether a signal is being processed or not. For example, this is
especially essential for troubleshooting, which can be simplified
considerably. Finally, the Arduino can communicate with the computer
while you sport, for example, to transfer the program codes to the processor.
You can reset the code at any time with a reset button. This button stops all
functions that the board performs and restarts it. We will neglect the other
elements and connections for now as we will come back to them later or in
the practical project. We will understand the practical use of the connections
in the next chapter. We turn away from the hardware and take a look at the
Arduino software. Stay tuned. After the basics, exciting and great projects
will await us. But first, a short explanation about the use of a so-called
breadboard upright board is the best way to build a circuit as soon as it
becomes a bit more complex or contains several parts. With the breadboard,
there is an area for the power supply of the Breadboard Plus and minus
imprint and areas with letters and numbers. The pins that are in the row
letters eight to eat and F-250 are conductive, fully connected to each other.
This means, for example, H1 and A1 or H5 and i5 and G5 are conductive
fleets connected to components, and cables are plucked into the respective
pins and thus connected to each other.

OceanofPDF.com
THE ARDUINO
SOFTWARE (IDE) &
PROGRAMMING BASICS
The Arduino Integrated Development Environment, commonly known as
the Arduino Software I.D., consists of a text based editor for writing the
lines of code and using the section toolbar. Several menus. The software can
be connected to a microcontroller of the Arduino board to upload coats to
run a program. Download the software at Arduino Dot CC. In this chapter,
we will look at how to write the program code in this Arduino IDE, which
you can later execute on the Arduino board. But first, let's take a look at an
alternative method when programming an Arduino. Before we go into more
detail about the Arduino idea and learn how to create the program code in it,
we will first get to know the method of block based programming. This is
simply an alternative to the more complicated text based programming that
follows later block based programming. It's the simplest form of
programming.
This is mainly useful and great for people who have no experience with
programming because you can achieve success quickly and easily. You can
imagine it as if you put building blocks on top of each other in the software,
each of which has a specific function. You just have to put these building
blocks together in an orderly and meaningful way to get the finished code
for beginners. This type of programming is very useful to learn the basics of
programming methods in general operation. The best way to get started
with book based programming on an Arduino is to use Autodesk's
Tinkercad software. Tinker Cat is an online platform where, among other
things, you can quickly and easily program on Arduino using the block
based programming, which are presented after creating an account at Tinker
Cat dot com. You can get started. Through block based programming, we
mainly get the following three advantages. As a beginner, we don't have to
be afraid of small but essential errors in the syntax. The program structure.
Second, we can thus concentrate on the main task without worrying about
the programming interface.
And third, we can become more familiar with the basic structure and flow
of a text based programming through the given blocks, code blocks are
divided into different categories. These categories are also color coded for
better clarity. The following categories are available for selection. Category
output These blocks are used to instruct the actuators what to do while the
microcontroller. So we control the output signals through this category
input with the help of these blocks. We bring the data from the census that
means the input signals to the microcontrollers. Category annotation
comments. The blocks that can be found in this category do not directly
affect the Arduino code, but are used to indicate what the program code
actually does. These books help the user to understand the program code
category. Control control structures help to enable the microcontroller to
make decisions based on the data it receives. Category variables Variables
are changing values that the program uses to execute mathematical
functions or to store data. When we use blocks from the different categories
on Tinkercad, they align with each other like in a flow chart. But let's just
take a look at a relatively simple example. For example, we would like to
control an LED using block based programming and Tinker could. In our
example, we connect an elegy to two of the Arduino. Furthermore, we put a
resistor between the negative pin of the lady and the negative terminal of
the Arduino board TNG to control the amount of current flowing through it.
This resistor will help us control the amount of current flowing through
already and will prevent the lady from burning out. For example, if we now
at the first block from the category output and tinker cut as shown in the
image, we can use it to turn on the LCD. It also automatically implements
the following circumstances in the program code without us having to
program them separately. First, Pinta is defined as output per second. Pinta
can no longer be used as an input pin. Third, in this code set up, the lady is
connected to 2.2 of the Arduino for the actual switching on of the other. Just
playing around with pink occurred and the possibilities of block based
programming. That's the best way to learn. Meanwhile, we continue with
the preparations for this course mainly discussing text based methods of
programming. In the Arduino software, you use the built in text editor to
write code for the Arduino, a code written with the Arduino software. It's
called Sketch. The editor includes the following functions, among others.
Cut and paste and search and replace the message area provides the ideas
response when code is written. Such a response can also be an error
message. For example, the console provides text based output messages
provided by the Arduino software, for example general information. And
Arduino code can then be saved with the file extension. But, you know,
when it is ready. In the lower right corner of the window, the configured
Arduino board and serial number are displayed. The toolbar buttons give
you options to review and upload programs, create sketches open and safe,
and open the serial monitor. Using the serial monitor, you can see what
information the Arduino is sending to the PC MEPs, the communication
between Arduino and PC. In the next step, let's familiarize ourselves in
detail with the elements of the program for this purpose. Let's take a look at
the common bar with icons located in the upper part. The small checkmark
is used to check the entered code for errors before compiling. Compiling
means that you or the program translates the programming language into
the machine language of the computer compiling then starts automatically
with a click on the checkmark. With the error located to the right of the
check mark and pointing to the right, you can upload your code to the
configured Arduino board. It must be connected via a USB port for this.
With the arrows pointing up and down, you can open or save a sketch with
the open error. You can also find example sketches. The button next to it,
which looks like a document, is used to create the new sketch. And the
small magnifying glass on the right side of the program opens the serial
monitor, this is used as already mentioned to monitor the communication
between Arduino and PC software or vice versa. Libraries represent an
extension that allows us to quickly and easily give the order to renew
additional functionality. It is basically nothing more than a coat that has
already been written by eager members of the community. Especially for
Arduino beginners. This is a huge help in terms of time and effort. You can
use a library by importing it. This is done in the Arduino software ID in the
menu at the top under the item sketch. Here you select the library and then
select the library you want to use. You will get hashtag include statements at
the beginning of the code. Alternatively, you can just write them directly at
the beginning of the code. If you know the name of the library. The library
manager is used to install new libraries in the sketch tutorials, open the
program and click on the sketch menu and then include library and then
select Manage libraries. In the library miniature, we find a list of libraries
ready for installation. Now we want to search for example, for the IMU
Library.

To achieve this, we simply type in the abbreviation IMU in the search field.
After that, we can select the version of the library. I am using the
abbreviation of Inertial Measurement Unit and is the name for a
measurement unit sensor network that is used to measure acceleration and
rotation rates. After we have selected the latest version, we can click on the
install button and then have to wait briefly for the new library to be
installed. If we switch to the include library menu item again, we can check
whether the library is now present and the installation was therefore
successful. New or needed libraries can also be found online. These can be
downloaded and installed as compressed files. Most libraries can be found
on GitHub. GitHub dot com GitHub is a management platform community
for software development. Once you have downloaded the library, you can
load it into the program in the following way. In the Arduino I'd go to
sketch then include Library. Then select Edit Zip Library. Then we are
prompted to specify the location of the desired library, navigate to the
location of the downloaded file and select I will tell you which libraries we
need for our subsequent projects at the beginning of each project. If we then
click again on the sketch tab in the upper menu bar and then on include
library, we can if the process was successful, see the installed library in the
lower area of the drop down menu. Now the library is ready to be used. The
serial monitor is used to display data sent from the Arduino to the computer.
Here it is important to take the correct ball great. So the portrait bottom
right so that it matches the rate you find in the sketch environment at Serial
Dot Begin. What this means, exactly, you will understand better when we
get to the practical projects, so it's best to go on first if you don't understand
something right away. By the end of the course, it should be clearer. So that
we do not have to work exclusively with block based programming. We
would like to get to know text based Arduino programming in this chapter
as well. This type of programming is a bit more difficult because we need to
know the exact syntax and functions. Arduino code is written in C++
programming language. Therefore, this chapter will give a basic overview
of the structure of a text based Arduino code, as well as introduce the most
important functions well, use and structures. After working through this
chapter, we also already get to the very practical programming and
implementation of some great Arduino projects. We've read the code and
ordered that you know, it's in the text based editor in a so-called sketch.
This contains the complete code, which is then transferred to the Arduino
microcontroller with the upload button right arrow. Before that, you have to
click the check mark to compile the code for any code written for an
Arduino. There are two essential components. The first of these is to set up
the coat inside the following curly braces of this function is executed only
once and all relevant and essential information and structures for further
code are listed here. For example, we tell the microcontroller here which
pins are used as inputs and rich pins are used as outputs. The other essential
component is loop, the loop function creates a loop. This means that the
code inside the following curly brackets will be executed again and again,
and not only once any task that the microcontroller is to perform is written
into here. So the basic code is written here. Let's first familiarize ourselves
with the general program structure syntax. When programming Arduino
code. You can imagine the antics like the punctuation marks and paragraphs
in the text, for example, after a sentence, you make a period. But when
programming an Arduino, you make a semicolon after each line of code. In
addition, we must adhere to the following structure. Curly braces are used
to start and stop a function when the function is executed. The code inside
these braces is executed. A semicolon tells the code that the current line of
code is finished. Tooth lashes are used to write the comment to better
understand as a human what the code is doing. All lines of code that start
with these characters are ignored by the microcontroller. Multi-line
comment can also be started with a flash, followed by an asterisks. When
you are done with this, you set the string in the opposite way. That means
first and asterix and then slash all lines of code between these characters are
also ignored by the microcontroller, with the hashtag defined. You can
assign a name to a constant variable with hash tag include. You can include
an external library into the code.
If a coach should not work once all the software gives an error when
compiling, you should always check first whether you have used all syntax
elements correctly. For example, check whether there is a semicolon after
each line of code or whatever. All comments start with two slashes, or
whether all the necessary brackets open and closed have been set. The
following operators are used when programming in code to define logical
comments when. The following operators are used in programming to
define logical comments when programming Arduino code. Two equal
signs mean equality of two variables, for example, X equals equals Y, X and
Y, both equal. An exclamation mark followed by an equal sign means
unequal, equal less than sign means less than another variable agreed to
then sign means greater than another variable. A less equal sign means less
than or equal. Another variable agreed to equal sign means greater than or
equal to another variable. The percent sign you can get the remainder.
Therefore, mathematical operation and asterix is used for multiplication
plus is used for addition. Minus is used for subtraction as Lesch is used for
the division. Equal sign is used to assign a value to a variable to end. Signs
are operative for logical end to vertical signs are the operative for logical or
plus plus means error 1:59 variable minus minus means subtract one from a
variable plus equals the abbreviation for X equals x plus y minus equals.
For example, is the abbreviation for X equals x minus y. Every contains
multiple values for one variable, bullion stores, the binary state of variable,
true or false byte stores, a bite value chain stores one character float. Stores
of four provide value and decimal form, double stores and eight byte value
also in decimal form into stores. A four byte number long stores, an eight
byte number size T stores the size of a variable in bytes string stores, a text
unsigned followed by, for example, or long or other command hopes with
negative numbers. An unsigned conder consideration is performed. Void is
used for function declarations that do not return a value at the end of the
function. When programming for an Arduino data or values can be either a
constant or a variable, here is the difference: a constant is a fixed value.
That means a data element to which a value has been permanently assigned.
The constant high means that the microcontroller should apply five volts to
a pin. Additionally, which one has to be defined? The constant low, on the
other hand, means that the Arduino should apply zero world to a pin, in
addition which one has to be defined. The term true is used to define that a
certain statement is true. The term false is used to define the particular
statement as false input defines that the pin to be determined is used for an
input signal. That means that the microcontroller should read which voltage
is present at this point. Output defines that the pin to be determined is used
for an output signal that means that the microcontroller should apply either
zero or five volts high or low to this pin input pull up.
It's used to connect an internal resistor to a pin. LRT built in is used to
control and connected to 13 of the Arduino describes a fixed numeric value.
A variable is a data element in the Arduino program that associates a name
or letter with an assigned value. Defining a variable is called a declaring
variable in the programming language. You can perform all kinds of
mathematical operations with a variable. For example, Using this line of
code, we declare an integral variable that is named X and has a value of 45.
When we have declared the variable in this way, we can use this variable in
our program. Such a declaration must always take place first. Otherwise,
the microcontroller will not know the variable. Now we can calculate with
this variable, for example, at the value 10 to this variable. This would then
look like this. This line of code says that the new value for X is equal to the
old value of X plus the constant 10. We can also transfer the value from one
variable to another. We do this by writing the new variable on the left side
and the original variable on the right side. For example, we want to store
the value of it in a new wearable, for example, in the variable. Why then do
we have to write? Once a variable is declared, it is associated with the
stored value throughout the program. If we try to assign this name to
another thought to type, the IEEE will give an error message. Also essential
is the scope of the declared variable. This simply means that if we declare a
variable at the beginning of the program, we can use it anywhere in the
program. However, if we declare a variable only in a specific function, then
the variable can be used only in that function. In the following code, we can
declare three variables for this purpose as an example and consider what the
scope of these variables is. So now we have declared three variables named
X, Y and Z. Scope X is a global variable and can be used in any of the
functions declared at the beginning of the program. Code Y was declared in
the scope of void loop, so it can only be used in that scope and set was
declared void. New function. So again, it can only be used in that specific
function. So always pay attention to which variables you declare in which
place. To combine the individual variables, operators and constants into a
function or a working structure, we need expressions that create the control
or command. The most important ones are as follows. If is used for
checking a condition and is used to perform an operation when that
condition is met, LS is used for the action to be performed if the condition
is not met, as if it's used when a second condition is to be checked. If the
first condition is not met, break stops the code in a loop. Continue, restarts
the code in a loop while is used to create a small loop within the code. This
is executed until a defined condition is met for its use to create a loop that is
executed with a defined number of operations to while is used to create a
small loop that runs until a condition is met. Goto makes the program
continue in a straight line. Return will return a specific value at the end of
the function. Functions are basically nothing more than abbreviations for a
code segment that you would actually have to write again and again for a
certain action, since some actions are needed frequently. It makes sense to
bundle them in certain expressions. The functions are simply declared like
variables. In addition, functions bring some other advantages. Some
advantages that functions offer are the code remains organized and
structured. Debugging the code becomes straightforward. That is, if the
code doesn't work, the code is efficient and clear. The code is
straightforward to understand for a new user. As an example, we can create
a function that adds to numbers. In this code, we have declared a function
called test function. At the beginning, we used the word void, which means
that the function does not return a value but only performs the action. That
means X, X and Y and then stores them and sets them. If we want to output
the revenue for that, we need to construct the function as follows. This
function is of the integer data type. It adds X and Y then stores the result
that means the value in set and then outputs the value of that which is stored
in an integer variable called a. We have started the functions in both cases
and the word loop area. We did this because we want the function to be
executed continuously. That means in a loop. If we wanted to execute the
function only once at the beginning of the program, we would have put it in
the void setup scope. Some very basic and important, as well as already
declared and thus ready to use functions utilized in Arduino programming
are digital. Read to read the digital input to get to the right to right to a
digital output pin mode. To assign an order, make a pin connector of the
port, either an input or an output pin and agree to read the analog input and
look right to right analog output. Stop every tone of a passer with no tone to
start a tone in the bus or reduce tone to read a pulse on a pin. Use pulls in.
Pulls in long. It's used to read long pauses to shift the pile of data we use
either shift in or shift out. Random to find a random number within the
bounds. To make the program wait for a certain time, we use delay the
number we put in the brackets then describes the waiting time in
milliseconds . For example, delay 1000 means coat weights, 1000
milliseconds equals one second. To make the program breathe in
microseconds, we use delay microseconds. Tariq, the time that has passed
since the program was started, micros, microseconds and millions in
milliseconds. To get the absolute value of a number, we use apps to specify
constraints, we use constraints to find the maximum of two numbers. We
use Macs to find the minimum of two numbers we use to calculate the
power of a number. We use power to find the square of no use square to find
the square root of a number. We use square roots. To calculate the value of a
bit, we use it to set a specific bet to zero. We use it clearly to reach a single
bit from a number. We use it to set it to one. We use it to convert a number
into bits. We use the right to get the leftmost byte of a number. We use a
high byte to get the byte on the far right of a number. We use Lopate to
attach an external interrupt function to a pin user, attach interrupt to remove
an external interrupt function from a specific point. We use detach, interrupt
to stop the internal interrupt use interrupts and to stop them. We use no
interrupt. Byte is used to convert a value to a byte char is used to convert a
value to a character variable float is used to convert value into a float
variable. Int is used to convert a value into an integer variable. Long is used
to convert the value to a long variable, and string is used to convert a value
into a string in the following. We will learn how to use some of these
functions using example projects, so don't worry if you don't know
specifically how to use the functions, operators and conditions yet. Before
we get to the project, let's take a brief look at how to connect the port to the
PC and load some program code onto the Arduino board to connect the
Arduino board with the PC or the Arduino IEEE software. We first have to
connect the Arduino board with a USB cable to the PC.

Then we open the menu tools in the Arduino IEEE in the menu bar and
select the correct board type in our case. The Arduino Uno and the menu
board. In the next step, we have to make sure that the correct use port of the
PC is assigned. We can also determine this on the tools in the Port submenu.
This menu item can be found directly below port. Here, the port must be
selected, which has Arduino or a similar designation. For example, also
genuine, the Arduino is connected to this port on your PC. Now, the
Arduino board is probably connected to the PC or software, and we can
start by writing the first program code, compiling it and loading it on the
board. We do this as follows. First, we write the program code or copy it
into the text editor of the IEEE. If you have a program code already
complete in itself, just delete the already existing text and then save the
sketch. Then we pressed a small check mark to check and compile the code.
If no errors were found, the message appears that the compilation was
completed successfully. This may take some time, depending on the length.
Finally, reload the coat onto the already new board by pressing the arrow,
pointing to the right, then the Arduino will start executing the program
code. Before that, you can open the serial monitor to monitor the
communication between board and software.

OceanofPDF.com
PROJECT 1 A FLASHING
LED AND AN SOS
SIGNAL
Project one, a flashing LED and an S.O.S. signal in this project, we will
control the state of light. For this, we will use an Arduino known to switch
the energy on and off with a delay of, for example, three seconds duration
of the landis' glow or five seconds switched off state required components.
One Arduino Uno. One breadboard for jumper wires led one 200 ohm. Or is
this Tor? We connect the lady to the Arduino using a resistor. The cables
and the breadboard. As shown for this, we first supply the breadboard with
power. We connect the RET cable to the five volt pin of the Arduino board
and the other end of the cable we plug into the breadboard, as shown in the
picture. We also connect the black cable to the key and deepen of the
Arduino board and the other end of the cable we plug into the breadboard,
as shown in the picture. Then we place the LG Shortall to the resistor and
the resistor is shown and connect the lady with a black wire to the ground of
the board.
We need the resistor to limit the current here. We use ohm's law and the
Formula R equals U divided by R stands for the resistance, U for the
voltage and I for the current. Finally, we need a yellow cable that can also
be another color which goes from the energy to the board pin to. Program
code for the Arduino IEEE. We first declared the wearable and the deep pin
and the sign tore the pin to which we have connected the lady pin to. Here
we enter the setup code to be executed only once. We want the lady pin to
be defined as an output pin, that means to receive an output signal so that
the alert lights up. That means. Here we enter the main code to be executed
in a loop. First supply deepens with five volt switches and on. Then three
thousand milliseconds, three seconds. Then supply deepens with zero world
turns off. Then reached 5000 milliseconds, five seconds. The Loop then
executes the program code rapidly. That means the lady rapidly switches off
and on with the previously defined delay and of the program code.
As an exercise, try switching the lady on and off at this point so that a
signal is sent. It's a signal three times short, three times long, three times
short, long signal two seconds short signal, one second distance between
short and long point five seconds distance of five seconds between several.
So as signals pop post the project for a moment at this point and try it
yourself. The solution will follow shortly. Now, the solution follows, we
only have to change the part in white loop in the previous program code for
the S.O.S. signal. This could look like this. A short signal is defined in the
following, for example, with one second along one with two seconds elvedi
on between the signals, there should be 0.5 seconds for disconnection of.
The three short signals follow first. First supply, the alleged weapon with
five volt switches already on wait for short signal, 1000 milliseconds one
second. Then Supply Ella deepened with zero world switches, Eladio off.
Well, for example, five hundred milliseconds to separate point five seconds.
Supply deepens with five faults again switches already on. Wait for a short
signal. Thousand milliseconds one second. Then supply deepened with zero
volt switches, any of. Wait for separation. For example, five hundred
milliseconds points to five seconds. Supply of the Dippin with five volts
again switches a lady on. Wait for a short signal, 1000 milliseconds, one
second, then supply deepens with zero volt switches off. Wait for
separation, for example, five hundred milliseconds, 0.5 seconds. Then the
three long signals follow. First supply and the deep end with five volt
switches already on. Wait for a long signal. Two thousand milliseconds.
Two seconds then supply an LTE pin with zero world, which is an LCD of.
Wait, for example, 500 milliseconds for separation point, five seconds. We
need this paragraph two times more. Finally, three short signals follow, just
like in the first section. To separate between several signals, for example,
wait five thousand milliseconds, five seconds. The loop function then
executes the S.O.S. signal rapidly and permanently. When you try the code,
don't forget the rest of the code structure as in the first project. Just replace
the part inside the void loop from the first project with the code from here.
Excellent. We have successfully completed the first protection. Let's move
on to the second project, this one will be a bit more difficult.

OceanofPDF.com
PROJECT 2
TEMPERATURE BASED
LED LIGHT
We will control the state of an archipelago based on the temperature well,
you detected by a temperature sensor when the temperatures are high, the
lights would turn red. On the other hand, when the temperature is low, the
lady should turn blue when the temperature is optimal. The light shall be
green. Required components. One Arduino, Uno one Brett bought jumper
wires, one RGV, a 3D one 200 Ohm resistor, one three five temperature
sensor. But Elham, 03:05 provides an analogue output voltage that is
linearly proportional to the temperature in degrees Celsius. The temperature
ranges from minus 50 to plus 155 degrees Celsius to convert the analog
voltage into a temperature. A scathing factor of 10 movable per degrees
Celsius is required. The assignment of output, voltage and temperature in
Celsius can be read from a linear function.
For example, the 580 volt signal of the sensor corresponds to 50 degrees
Celsius, and Agip can shine in three colors, namely red, green and blue. The
lady has two more connections than normal energy, and the color of the
light depends on which connection is supplied with current. To control the
energy you need pins three six five, which are actually digital pins that also
allow pools with modulation. You can recognize this by the small print, and
we've also at nine, 10, 11. First, we supply the bread with power again for
this, we connect the red cable to the five pin of the Arduino board and the
other end of the cable, we plug into the breadboard, as shown on the
picture. In addition, we connect the black cable to the T and deepen the
Arduino board and the other end of the cable, we also plug into the bread
board that's shown in the picture.
Then we at the LNG and the temperatures into Tempe, make sure that each
leg is correctly seated in the connectors. You need to be careful here not to
break any of the legs when bending them into place. The two outer legs of
the temperature sensor are supplied with power by connecting a black and
the red wire to the plus and minus pole of the breadboard. We connect the
middle leg of the temperature sensor with a coloured cable to the connector,
a zero of the Arduino. We connect the legs of the RCMP, a lady with
coloured cables to the digital pins. Three, five and six of the Arduino board.
Furthermore, we need a resistor to connect one leg of the archipelago to the
negative pole of the breadboard and thus also to the pole of the Arduino.
Program code for the Arduino. IEEE, we first declare our wearables by
assigning them to the respective connection pin. The abbreviations are b
key to stand for red, blue, green and temperature, respectively. Connection
for it, glow of the PIN three, connection for blue, glow of and PIN five.
Connection for green glow of energy at six. Temperature sensor is
connected to the PIN. Here we enter the set up code to be executed only
once. We want all pins connected to the ready to be defined as output pins
and the pin connected to the temperature sensor to be defined as input pin.
First, we need the above command for the serial interface that I read nine
thousand six hundred thirty seconds. This starts the communication between
PC and Arduino board, and the temperature is transmitted to the serial
monitor in the IEEE Board rate nine thousand six hundred. Definition of pin
is PIN three as output pin definition of the PIN B. That means the PIN five
as output pin definition of PIN G. That means PIN six is the output pin
definition of pin tee. That means pin a zero as input pin. Here we enter the
main code to be executed repeatedly in a loop. First, we define the
following code: the function temp, which we will need in a moment for this
purpose. The microcontroller is to read the value in PIN a zero. I'm 35 and I
look at temperatures in the. Shows us the temperature and the surreal
monitor. In the following we create and if and several as if conditions which
controlled the LRT in several steps, depending on the temperature of the
sensor, therefore we use look right instead of digital right here only. Zero
volt or five volt would be possible. See first project. When the output
voltage rises above the value 300mm 300-year-old approximately 30
degrees Celsius, according to the scaling factor, the following values should
be applied to the pins. A strong red color? Well, you scurried up from zero
to 255. If the voltage is above the value of 250 million volt, approximately
25 degrees Celsius, on the other hand, the following values should be
applied to the pins in the following analogously a medium red color. A faint
red color.A strong green color.A mixture of blue and green.A strong blue
collar. The Loop then executes a program code repeatedly that means the
temperature is measured and interpreted continuously, and the signal is
passed to the deep end of the program code.

OceanofPDF.com
PROJECT 3 LIGHT-
DEPENDENT CONTROL
OF A MOTOR (BLIND
MOTOR)
We want to control the outlines of a window with the help of a servo motor
and an elder sensor. This should happen depending on the amount of light
coming in from outside. Required components. One Arduino Uno, one
breadboard, one photoresistor, the R-Centre one several motor, nine champ
of wires, one resistor 4.7 kg As the name suggests, a photo resistor can be
thought of as a simple resistor that has the special feature of changing its
resistance value, depending on the amount of incident light. The less light
falling on the sensor, the higher the resistance becomes, the more light
falling on the sensor, the lower the resistance comes. The sensor is based on
the photoelectric effect. As usual, we first supply the Brett Port with power
to do this, connect the black and the red cable from the tee and deepen and
the five volt pin of the Arduino board to the positive and negative pole of
the breadboard.
By the way, it doesn't matter which TNT pin of the port is used. Then we
insert the photo resistor and the several motors, as shown in the picture.
There is still one resistor missing and the rest of the wiring you can do as
shown in the picture. Program code for the Arduino I.D.. First, we include
the required library for the several more tours in our program code. If the
I.D. gifts an error message when compiling, you must first install this
library while the library manager. Then recreate the several objects so that
we can control the servo motor. Then we declare the connection points for
several motors and sensors for tourists too. Then we have to declare
variables for the position of the cerebral and for the properties of the
photoresistor. Very able for saving the survival position, very able to store
the survival position at max light. This is the well you would define as
maximum light incidents. Light intensity at any position. Here we enter the
setup code to be executed only once. Here we want to connect the server
with the server object and start the serial communication. Connects to
several to pin five with a several object start, serial communication said
board rate to the seller of the serial monitor. Eight zero is defined as an
input pin. Here we enter the main code to be executed repeatedly in a loop.
For each position, from zero to 180 degrees of the several modes to execute
the following code posts plus equals one means pass equals posts plus one.
That means posts equals zero plus one equals one. Said position of several
motors and you will use them. That position for several zero to 180 degrees.
Reid sends a value and overwrite variable. Check if maximum light incident
is reached, if this condition is true, it means that the output value for the
variable max light equals nine seven is greater than the value that the sensor
is currently outputting. That means the maximum brightness would not
have been reached. Store new values for maximum brightness. Safe to
several positions. Shows us the intensity in the serial monitor weighs 50
milliseconds until the cerebral motor has reached the position. Right center,
well, you light incidents also in reverse loop position from 180 degrees to
zero degrees. Store new value for maximum brightness.Saved the survival
position at maximum light incidents. In the following section, the server
was to move to the position that was saved if the following condition is met.
Check if the now new store value of the variable is not equal to the initial
value of the variable darker, the maximum light. Go to the defined position
of maximum light incidents. Shows us the sense of, well, you and the serial
monitor. Wait, 20 seconds. Check whether the light intensity has changed or
not. Float equals floating point numbers. Checking the change of the light
intensity. Wait, three seconds. Reset initial variables. End of the program
code.

OceanofPDF.com
PROJECT 4 GAS
DETECTION ALARM
We will build a gas detector that will sound an alarm if it detects a gas leak.
The alarm will sound until the gas leak is stopped. In addition, LEDs are
triggered depending on the amount of gas that the sensor detects if there is a
lot of gas leaking. All four ladies should light up. If there is little gas, only
one of the four lights should light up required components. One Arduino
Uno on a breadboard, one gas sensor, one buzzer, 14 jumper wires, five
resistors, one kiloton, four Lydian gas sensors, one resistor, one home at
four percent four energy. We connect all the components and the Arduino
together on a broad breadboard, as shown on the picture. Make sure that
you use the correct pins. You can also arrange the components differently if
you like.
However, the circuit should remain comparable. But then you might have to
change the variables or names in the following code program code for the
Arduino I.D.. We first declare our liability for the gas center assigning the
connector pin A0. Here we enter the setup code to be executed only once.
We want pin zero, which is connected to the gas sensor to be defined as an
input pin. Also, we want all prints connected to the buzzer, or it is to be
defined as an output pin. Define the guest center as input. Defined
perception as output. Define low deepen as output.

Then we start the communication with the serial interface data rate nine
thousand six hundred per seconds with the following code. This starts the
communication between ordering a port and PC, and that data is transferred
to the serial monitor in the. Here we enter the main code to be executed
repeatedly. First, we declare a variable that should reach the center. Then
we generate the tone at seven with 220 Hertz for 100 milliseconds. Tone is
activated as soon as the sensor registers measured while you. That means
guess no matter in which quantity. Then wait 300 milliseconds. Then no
tone should be applied to 2.7 seven anymore. Then 10000 milliseconds
should be waited for. In the following we create and if and several as if
conditions which give us different control of the ladies, depending on the
gas value measured by the sensor, we use digital right here. If value is
greater than 75, then switch on all these. Otherwise, if between 50 and 75,
then. Switch on only three LEDs. Otherwise, if between 25 and 50, then.
Switch on only to early this. Otherwise, if between zero and 25, then.
Switch on only one lady. End of the program code.

OceanofPDF.com
PROJECT 5 PASSWORD
PROTECTED
MECHANICAL SYSTEM
We will create a system that is protected by a password. It will remain
locked until the user enters the correct password. When the correct
password is entered, the cerebral motor will move and open the system. We
will assign different passwords to different uses. Each user will have their
own user ID and password. The system will only be unlocked if these two
security features match and are correct. Moreover, after multiple incorrect
entries, the red light and buzzer shall be activated and the entry shall be
locked for 30 seconds.
On the other hand, if the input is correct, the green agenda should activate
the required components. One Arduino Uno on breadboard one Keep It one
LCD display various jumper wires three resistors two LCD one busser one
several motor. We link all the components and the Arduino together, as
shown in the image. We don't use a breadboard this time because almost all
the connections are between the Arduino and the individual components
anyway. But you can also use a breadboard for this if you want to. Before
we start with the program code, we have to install the required library for
the Keep It, Keep It by Mark Stanley and Alexander Breivik. We do this
either via the library manager or research the corresponding zip file online
using Google and find it. For example, here Playground Dot, Arduino Dot
CC and loaded into the Arduino IEEE. You may need to do this for the
display as well. Program code for the Arduino I.D.. First, we include the
necessary libraries for the servo motor, the Keepit and the LCD display in
our program code. Then we create a server object so that we can control the
servo motor. In the following we declare our variables for the green and the
red lady, as well as for the buzzer by assigning the connector pins 10, 12
and 13. We then declare the number of rows and columns of our keyboard
field for each. With Kemp, we define the keys on the key pet that can be
pressed according to the road and columns as they appear on the keyboard.
Then we need a coat that maps the connectors of the carpet with the
connectors on the Arduino rows zero to three columns zero two three, the
following code initializes an instance of the keypad Chris. The following
code creates a variable for the LCD display with the numbers of the pin
interfaces assigned to the LCD display.
In the following, we assigned the user IDs and passwords. In addition, we
declare the following variables. Here we enter the setup code to be executed
only once. Start surreal communication. Initials, LCD display. Wait, five
milliseconds define green lady variable as output, define a red LED variable
as output, define busser as output, and set the position of the text on the
display column row. Show text. Enter the code. Set the position of the text
on the display column row display text to open lo Now we need code for
the servo motor. Several motorists connected to 11 to several motorists
should move to position five degrees. One thousand five hundred
milliseconds end of the code four void setup. Here we enter the main code
to be executed repeatedly. Below is the code that verifies the entire user ID
and password. The following message should be shown on the display. If
the password was entered incorrectly, the position of the following text
displayed. Said position of the following text display text waits three
seconds. Allow input to start again. Said position of the following text
displayed text said position of the following text display text. Wait point,
five seconds. Start verification from scratch. If the check was correct, but
the password was not or not yet, the following should be displayed. Said
position of the following text display, text said position of the following text
display text. If the attack was correct and the password check was also
correct, the following should happen. Following is to code that will be
executed if the passport and I.D. are entered correctly. Green added You
should light up that position of following text display text said position of
the following text displayed text wait five seconds. Said position of the
following text display, text said position of the following text several motor
opens 180 degree movement. One point five seconds. If the wrong input is
made several times, the input should be locked for 30 seconds and threat led
as well as the buzzer should be activated. The following is the code for this
set position of the following text displayed text said position of the
following text display text. Right, algae should light up and passa should be
activated. Subsequently, wait 30 seconds and display text. Said position of
the following text display, text display, number of seconds remaining.
Display text switch off a red LED. Switch off buzzer said the position of the
following text displayed. Said position of the following text, display, text
and of the program code.

OceanofPDF.com
PROJECT 6 REMOTE
CONTROLLED
UNLOCKING
MECHANISM
We will control the mechanism for opening and closing a gate with an air
remote control to be able to open the gate. The code should be entered on
the remote control. For example, one six five eight eight six three in
addition to arguing and that is in the buzzer, shall accompany the process.
Furthermore, a temperature sensor should monitor the ambient temperature
and issue an error message if the temperature is too high. Additionally, an
already shall be activated if the photo sensor measures only little ambient
light. Furthermore, we install a button switch for manual operation.
Required components. One Arduino Uno two reports, one air infrared
remote control, one air infrared receiver sensor, one LCD display, various
jumper wires, six resistors, one potential meter, one busser one several
motor two archipelagos one DC mute motor one l two nine 3D motor driver
one LDR center for two resistor one temperature sensor one button switch.
Connect all components as shown. Before we start with the program coat,
we have to install the required library for the air infrared remote control by
arming your camera. The best way to do this is to use the library manager,
search for the library in the I.D. and load it. You may have to do this for the
display as well. Program code for the Arduino IEEE. First, we include the
necessary libraries for the servo motor, the air remote control and the LCD
display in our program code. In the following, we first declared the variable
for the air sensor by assigning the Connector eight to. We also need the
following two expressions for the arsons or. Then we create, again, several
objects so that we can also control the servo motor. The following code
creates a variable for the LCD display with the numbers of the pin
interfaces assigned to the LCD display. Below, would you find the function
for opening? Tone at eight with 220 hertz for 100 milliseconds. The several
motors should move to position zero degrees. Wait, 15 milliseconds.
Declare a variable temp right temperature, well, you. As long as the
temperature is above 250, 25 degrees since 10 million wrote 10 multiples
equals one degree Celsius shall activate at PIN 13. Disable it, been a four.
Said position of the following text showed text said position of the
following text display text. Reached temperature value. Activate LTE at a
four, deactivate it, pin 13. Activate PIN seven motor. Deactivate pin eight
motor wait, three seconds. Set position of the following text display text
deactivate PIN seven, enable PIN eight wait three seconds. Deactivate PIN
seven, enable pin eight weight one hundred milliseconds. The several move
to move into position, nine to decrease. Wait, 15 milliseconds and the
following, would you find the function for the lady when there is too little
light? Declare variable light red light. Well, you. Flight quantities over 500
then. Deactivate Penton said the position of the following text displayed
text your flagged quantities under 500, then. Activate Penton. Said position
of the following text display text. Here we enter the setup code to be
executed only once. Initialize LCD display columns, rows of the display.
Stop the eye or sensor with the following code. The survival motor is
connected to the servo motor and should move in position 90 degrees. Wait,
15 milliseconds. Activate at four, deactivate LSD at PIN 13. Here we enter
the main code to be executed repeatedly. If Terminal 85 gets current five
volts because it is high, then. Set position of the following text showed text.
Execute the open function set position of the following text. The following
code says the following if a signal was given by the remote control or
received via the air sensor. And if the signal corresponds to the following
code one six five eight eight six three. Was an air signal received a match
code? Said position of the following text showed text executing the open
function.

OceanofPDF.com

You might also like