0:00
[MUSIC]
[SOUND] So, a shield, an Arduino Shield,
is basically a printed circuit board.
An extra board,
that you connect to your Arduino to extend its functionality in some way.
So, the Arduino if you look at it all by itself without the shield the hardware is
pretty limited, its got a microcontroller, its got pins, holes that you
can connect to the microcontroller, its got an LED on there Right?
And then, there's a USB port that's used to communicate with the computer.
But besides that, it doesn't have much in the way of interface.
It is necessary in a more complicated system to extend it to do
certain things that you can't just do with the microcontroller alone.
0:58
So a shield makes that easy for you, a shield is basically two things really.
Its hardware, which is that little board, printed circuit board, which is basically
the same size of the Arduino and fits right on top of the Arduino.
Its sold as pre-wired, pre-manufactured board, and you can buy it manufactured.
There are also shields that are not manufactured,
where you can just buy the design, it's open source, you can buy the design and
you can manufacture it yourself.
But generally, you're gonna buy it pre-manufactured, so there's the hardware
side of the shield, but there's also the software side, the library.
The library that's associated with the Shield.
So to make it easy, we talked about libraries.
To make it easy to use these Shields,
that you're provided with some kind of a library with a set of functions that do
all of the interesting things that the Shield can do.
1:58
The circuit on that shield is pre-wired.
So, if you look at that shield, it's got several components on there, chips and
things like this, all wired together.
That wiring you, as a user, you did not have to do.
That wiring is given to you.
It's all pre-wired, so
you don't have to worry about the details of the wiring which can be hard.
Also, the wiring that connects the shield, all the shield pins, to the actual
Arduino pins, you don't have to worry about that either, because that's done for
you automatically by stacking the shield on top of the Arduino.
So, if you look at the shield, it's got pins underneath it,
which fit into the holes of the Arduino.
So, you don't have to do any kind of wiring.
You just take board, stack it right on top of the Arduino and
all the wiring is done for you.
So, that's a great thing, right?
You don't have to design the hardware side of the circuit at all.
2:47
Simple to use because the library functions take care of the complicated
details of how to use the device.
Like in this one this is an ethernet controller.
And there's a chip in there that's says,
wiznet ethernet controller chip if I remember the name.
And that's kind of a complicated chip to use.
I've used that chip separately, and there's a data sheet,
a thick data sheet, and you have to understand it.
With these library functions, you don't have to understand any of that.
You just call them and you've got an Ethernet connection.
3:18
Pins, so the picture is actually a shield without the pins attached.
Okay, so the pins on the bottom, so if you look a the Arduino,
he's got a set of holes, rows of holes on the top or bottom,
or left to right depending on your orientation that with pins.
So, these Shield have pins underneath them, that go right in so
they line up with the holes on top of the Arduino.
So, you can take the shield, and stack it right in there, and
the wiring is automatically done.
So most shields only use a small subset of the pins, even though,
all the pins are wired, so you stack and you connect all the pins, most of
the pins are not used to communicate between the Arduino and the Shield.
And this is important because, If you have multiple shields,
say I'm using two shields, I'm stacking two.
If they're using the same pins for
two different purposes, then the communication will fail.
So say, one shield, your using digital input one, ditto pin one for an input,
the other shield is using digital pin one for an output, then you got a problem.
So, when you're using multiple shields together you need to be aware
of what pins are being used for what shield, and how their being used.
Now, a common way for
shields to communicate with the Arduino is through I-2-C.
Which we learned about using the wire library right,
we can use the wire library to access that.
That sharing is fine, right?,
if you've got three shields and they all communicate through the Trough I2C.
They can share exactly the same pins, the SDA and SDL pins,
and there's no conflict, right?
As long as shield has a different address, and different slave address, no conflict.
You can stack as many as you want.
As we just learned about when we were talking about I2C.
But other times they use, the two different shields can use the same pin for
different purposes and there can be a conflict.
5:04
So, shield headers may not be soldered in.
So sometimes when you a shield, it's not fully manufactured.
Like in the one we see in this picture right here, you got the shield, but
it doesn't have its header pins soldered in.
So, you'll see on one of the sides it has holes.
It does not have actual pins underneath.
5:21
Just next to the shield are the headers, what are called the headers.
Those are the pins that you're gonna solder in.
So, you would have to solder those in.
You have to stick them through the holes, and then solder them in.
We're not going to actually cover that in this class, so I would recommend that you
buy shields that are pre-manufactured fully and you don't have to do soldering.
Although, soldering is a useful thing, but we're not covering it.
Thank you.
[MUSIC]