Reader small image

You're reading from  Internet of Things from Scratch

Product typeBook
Published inFeb 2024
PublisherPackt
ISBN-139781837638543
Edition1st Edition
Right arrow
Author (1)
Renaldi Gondosubroto
Renaldi Gondosubroto
author image
Renaldi Gondosubroto

Renaldi Gondosubroto is an accomplished software engineer and developer advocate in the tech community. With a wealth of experience in developing proprietary and open-source solutions, he has made significant contributions to numerous organizations and communities. Currently, he holds all 12 AWS certifications, along with 20 Microsoft Azure certifications. He has a Bachelor of Science in Computing and Software Systems from the University of Melbourne and a Master of Science in Computer Science from Columbia University. Outside of the industry, he is active in the academic community, with his research focused on IoT and Artificial Intelligence. Having spoken at over 40 events, conferences, and workshops, he has been an international speaker for the past six years, sharing his experiences and projects. He aims to build open-source solutions and deliver content that can help people achieve more value in what they do and promote best practices for practitioners.
Read more about Renaldi Gondosubroto

Right arrow

Working with Cloud Computing to Power IoT Solutions

IoT devices obtain and process large amounts of data that needs to be stored, analyzed, and acted upon both in real time and near real time. This is where cloud computing comes in, as it is a powerful resource for providing the necessary flexibility, scalability, and cost-effectiveness needed to handle the data that is provided by these devices. Cloud computing is the provision of computer system resources on demand, without manual active intervention by the user. Instead, it is mostly managed by a cloud vendor.

Cloud computing is especially popular because you don’t have to procure and maintain hardware; instead, the cloud vendor maintains that for you. These cloud services are also distributed over multiple locations, allowing you to avoid a single point of failure and have resilience in having multiple zones that store your data, which is critical when you have production environments that require continuous access to...

Technical requirements

This chapter will require you to have the following hardware and software installed:

  • Hardware:
    • NodeMCU ESP-32S
    • IR proximity sensor
    • WS2812 RGB LED strip
    • Piezo buzzer
    • Jumper wires
  • Software:
    • AWS account
    • Arduino IDE

Setting up your AWS account

To access AWS’ cloud computing resources, you will first need to create an account with them on the AWS portal, which is where you can also manage the resources that you have already provisioned via their graphical user interface (GUI). The AWS Free Tier offers a variety of services at no cost for a limited amount of usage, allowing users to explore and experiment with AWS functionalities. It is advisable to utilize these free tier services whenever possible to minimize costs while running services on AWS. You will be able to set them up by reading their official documentation at https://docs.aws.amazon.com/accounts/latest/reference/manage-acct-creating.html.

You can access the GitHub folder for the...

Fundamentals of cloud computing with IoT

In your day-to-day life, the term cloud may not be too alien to you. You may have already heard it being used by providers other than AWS if you haven’t heard about AWS, or you may have heard about use cases. The cloud refers to a network of remote servers hosted on the internet, used for storing, managing, and processing data, as opposed to using local servers or personal computers. This technology enables on-demand access to computing resources and services, offering scalability, efficiency, and flexibility in managing IT operations. When first opening the AWS console, it can be overwhelming to see the number of different services that are available, along with the number of configurations that are associated with each service.

In this section, we will discuss the different fundamentals of cloud computing, including the different advantages of cloud computing, cloud computing models, and the deployment models that currently exist...

Services to work with for IoT

In this section, we will look at the different services that are used within AWS for IoT and talk through a practical exercise that will show you how you can utilize some of them to make a simple IoT system.

There are a number of services in AWS that make working with IoT within it very powerful. In this chapter, we will highlight six of those services and show how you can use them within your own deployments.

Identity Access Manager (IAM)

Identity Access Manager (IAM) is a service that helps users/organizations control access to their AWS resources. This enables them to create and manage users and groups and define permissions for them to access AWS resources such as S3 buckets, EC2 instances, or Amazon Relational Database Service (RDS) databases. An S3 bucket is a storage solution offered by AWS, designed to hold vast amounts of data in a scalable, secure, and web-accessible environment. RDS is also an AWS offering that provides managed relational...

Optimizing for resilience and low latency

In this section, we will explore the different approaches to ensuring that a deployment will be resilient and have low latency when deployed. As with other IoT networks, ensuring that the configuration we have for our networks is optimal is of utmost importance. First, we will be looking at the different strategies for resilience in IoT deployments. Afterward, we will look at how we can design and architect for it and see how it’s put into practice through a case study.

Strategies for resilience

For a successful IoT deployment, resilience is paramount. Ensuring that systems remain operational, even in the face of challenges, demands a multifaceted approach. The following are six pivotal strategies, each playing a unique role in fortifying the robustness and efficiency of IoT systems. These components, when implemented meticulously, not only safeguard against potential disruptions but also enhance the overall performance, scalability...

Practical—creating a cloud proximity detector

In this practical, we will create a unique cloud proximity detector using the Keyestudio Arduino Super Starter Kit, which integrates with AWS IoT services. The project will use a combination of sensors, actuators, and cloud services. By the end of this practical, you will understand the benefits of utilizing AWS for IoT networks and learn how to optimize costs, resiliency, and low latency in your deployments.

Assembling the circuit

First, we will assemble the hardware of the project:

  1. Connect the NodeMCU ESP-32S, IR proximity sensor, piezo buzzer, and WS2812 RGB LED strip as shown here:
Figure 7.7 – Wire-up diagram of the hardware of the project

Figure 7.7 – Wire-up diagram of the hardware of the project

  1. Connect the IR proximity sensor to the breadboard. Connect the VCC pin to the 3.3V output on the NodeMCU, the GND pin to GND, and the data pin to GPIO 36 (also known as VP or ADC1_CH0) on the NodeMCU.
  2. Connect the RGB LED strip...

Summary

In this chapter, we delved into the core principles of cloud computing for IoT, unpacking its myriad benefits, diverse deployment models, and the services tailored for IoT applications. Beyond the foundational knowledge, we navigated the intricacies of architecting IoT deployments within AWS. By mastering the use of a pub/sub client, we took a hands-on approach, illustrating how an EC2 instance can seamlessly interact with AWS IoT Core. As readers, internalizing this information is invaluable. It not only equips you with the tools and understanding needed to harness the full power of cloud computing in IoT but also primes you for success in the next stage of our journey: data analytics. These insights will empower you to design more robust and scalable IoT solutions, ensuring you’re at the forefront of technological innovation.

In the next chapter, we will be looking at data analytics services that we can leverage with AWS that we can use to process and analyze workloads...

Further reading

For more information about what was covered in this chapter, please refer to the following links:

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Internet of Things from Scratch
Published in: Feb 2024Publisher: PacktISBN-13: 9781837638543
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Author (1)

author image
Renaldi Gondosubroto

Renaldi Gondosubroto is an accomplished software engineer and developer advocate in the tech community. With a wealth of experience in developing proprietary and open-source solutions, he has made significant contributions to numerous organizations and communities. Currently, he holds all 12 AWS certifications, along with 20 Microsoft Azure certifications. He has a Bachelor of Science in Computing and Software Systems from the University of Melbourne and a Master of Science in Computer Science from Columbia University. Outside of the industry, he is active in the academic community, with his research focused on IoT and Artificial Intelligence. Having spoken at over 40 events, conferences, and workshops, he has been an international speaker for the past six years, sharing his experiences and projects. He aims to build open-source solutions and deliver content that can help people achieve more value in what they do and promote best practices for practitioners.
Read more about Renaldi Gondosubroto