Hey, everyone. So in the last video we went over
the POPs model and the message broker for MQTT protocol.
Here, we're going to go ahead and show you
a more general high level overview of how to use those within AWS IoT and SDK.
So just a quick definition.
When we refer to AWS IoT,
we're referring to the service that AWS has.
However, the way you connect your devices to the cloud.
The SDK however, is what you're going to install on
your different devices in order to communicate with the cloud.
So the SDK does have a bunch of different languages.
For instance, C, Python,
JavaScript and all that stuff,
so choose the language that you feel is best fit.
And there is an SDK available for the Dragon Board?
Yes.
So here we have a bunch of different IoT devices,
we just want go into what exactly an IoT device is.
What the image here shows the Amazon button called the Amazon badge shop.
Amazon sells these, and each button you can map to a product you're using in the house.
For example your toilet paper,
you buy a button and stick it next to your toilet paper,
you run out, just hit the button.
Amazon knows you're ordering a toilet paper,
and it delivers to your house.
And there are some safety measures in there,
so if you get it ten times,
they don't send you like a huge roll of toilet papers.
It has a certain mechanism,
it will send you only once a month and so on.
These buttons are really cheap,
you can buy these and map it to Amazon products.
However, you can do your own thing with it too.
As Ara mentioned, there's Amazon AWS IoT,
you can buy these buttons,
make it do your own custom thing.
This is outside of the Dragon Board, so you buy this button,
stick it in your house, you hit send,
it goes to Amazon Cloud.
You can it do whatever you want.
I don't know, start your Tesla.
Maybe one year you just put this button that goes to the Amazon Cloud,
Amazon Cloud stocked that Tesla services and
then it sends a message to your car or honk the horn, anything like that.
I would highly recommend it, you guys.
It's really cheap, so that could be one off your capstone ideas.
Buy this button and do something cool with it.
And the cool thing about the button is when you press it,
it just sends a signal like this button has been pressed.
So depending on what you want to do with that specific event with that specific device,
you can do whatever you want on the cloud.
Now let's see if you do want to do something more complicated.
Like in the future I believe, a modular lesson,
we have a project where we gather temperature data,
light data and was that sound data?
Yes. We have a project which you will see later on.
Of course we'll give all the source code for it,
where we use the AWS IoT SDK to get temperature,
light and the other sensor data,
and stream it in real time to the cloud, Amazon Cloud.
And you can see the data being plotted dynamically as we get the data.
So one way to use sensor data coming in using the MQTT protocol.
It's either you can send something really simple or something complicated,
but once it's into the cloud,
you can do whatever you want with it depending on the data.
So this is just a quick overview of how IoT service is,
or works on the servers.
Every single time your IoT devices send data,
they'll connect to the AWS IoT which is your quote unquote,
message broker and depending on which type of data.
So let's say you press a button for toilet paper,
you might execute a lambda function,
which will go on and connect you to maybe the Amazon store,
buy you the toilet, paper and ship it to you directly.
Or you might want to let's say,
get your temperature data from your Dragon Board,
send it upstream, maybe store it inside of a database like DynamoDB.
You can do whatever you want,
and maybe you can also do multiple things at once.
Let's say every single time you press a button not only
does it buy you products from Amazon,
but you might also send a push notification to your roommates saying,
"Hey, I'm buying toilet paper."
You can do a bunch of different stuff once the data is on the cloud.
This is another quick overview of
the architecture and just some cool things that you can do with the IoT services,
such as device shadows whenever your devices do go offline.
But for the most part, we're not going to go too much into that.
Real quick, I'm going to go over to the screen and I'm going to show you
a quick example of how this AWS IoT works,
and then we'll go ahead and look at the SDK.
So we will be going over a more hands on experience for IoT service in a different video.
So what I want to focus on here is,
how publisher subscriber model works.
So you're currently logged into the Amazon panel?
Yes.
On the AWS IoT service right?
Yes. If you look here somewhere,
there is this AWS IoT right here.
I want to go ahead and click that.
And on the sidebar I'm going over to test.
This is a kind of a test broker that we can go in and play with.
First off, I'm going to subscribe to topics,
so let's say, toilet paper.
And I'm going to go ahead and subscribe to that topic.
And on the left hand side,
this new area appeared,
and then I'm going to go ahead and create a new topic, let's say food.
That is a new topic.
Now let's say I have a Dragon Board and I sent a request saying we need toilet paper.