Internet of Things with Raspberry Pi 3

Book description

Unleash the power of the Raspberry Pi 3 board to create interesting IoT projects

About This Book
  • Learn how to interface various sensors and actuators with the Raspberry Pi 3 and send this data to the cloud.
  • Explore the possibilities offered by the IoT by using the Raspberry Pi to upload measurements to Google Docs.
  • A practical guide that will help you create a Raspberry Pi robot using IoT modules.
Who This Book Is For

If you're a developer or electronics engineer and are curious about the Internet of Things, then this is the book for you. With only a rudimentary understanding of electronics, the Raspberry Pi, or similar credit-card sized computers, and some programming experience, you will be taught to develop state-of-the-art solutions for the Internet of Things in an instant.

What You Will Learn
  • Understand the concept of IoT and get familiar with the features of Raspberry Pi
  • Learn to integrate sensors and actuators with the Raspberry Pi
  • Communicate with cloud and Raspberry using communication protocols such as HTTP and MQTT
  • Build DIY projects using Raspberry Pi, JavaScript/node.js and cloud (AWS)
  • Explore the best practices to ensure the security of your connected devices
In Detail

This book is designed to introduce you to IoT and Raspberry Pi 3. It will help you create interesting projects, such as setting up a weather station and measuring temperature and humidity using sensors; it will also show you how to send sensor data to cloud for visualization in real-time. Then we shift our focus to leveraging IoT for accomplishing complex tasks, such as facial recognition using the Raspberry Pi camera module, AWS Rekognition, and the AWS S3 service. Furthermore, you will master security aspects by building a security surveillance system to protect your premises from intruders using Raspberry Pi, a camera, motion sensors, and AWS Cloud. We'll also create a real-world project by building a Wi-Fi – controlled robot car with Raspberry Pi using a motor driver circuit, DC motor, and a web application.

This book is a must-have as it provides a practical overview of IoT's existing architectures, communication protocols, and security threats at the software and hardware levels—security being the most important aspect of IoT.

Style and approach

Internet of Things with the Raspberry Pi 3 contains the tools needed to design, sense the environment, communicate over the Internet, and visualize the results.

Table of contents

  1. Title Page
  2. Copyright and Credits
    1. Internet of Things with Raspberry Pi 3
  3. Packt Upsell
    1. Why subscribe?
  4. Contributors
    1. About the author
    2. About the reviewer
    3. Packt is searching for authors like you
  5. Preface
    1. Who this book is for
    2. What this book covers
    3. To get the most out of this book
      1. Download the example code files
      2. Download the color images
      3. Conventions used
    4. Get in touch
      1. Reviews
  6. Introduction to IoT
    1. Understanding IoT
      1. Defining IoT
      2. Architecture of an IoT ecosystem
    2. History and evolution
    3. IoT–applications and future prospects
    4. Summary
  7. Know Your Raspberry Pi
    1. Understanding Raspberry Pi 3
    2. Important features of Raspberry Pi 3 Model B
    3. Setting up Raspberry Pi
      1. Connecting to the internet
    4. Setting up headless Raspberry Pi
    5. Summary
  8. Let's Communicate
    1. The internet
    2. The rise of JavaScript and Node.js
      1. Node.js
      2. Advantages of using Node.js for IoT
    3. HTTP
      1. Implementing HTTP
      2. HTTP server
      3. HTTP client
    4. MQTT
      1. MQTT architecture
      2. MQTT message types
      3. MQTT topics
      4. QoS levels
      5. Last will and testament
      6. Retained messages
      7. Persistent sessions
      8. Keep alive message
    5. MQTT brokers
      1. MQTT implementation
        1. MQTT broker
        2. MQTT client
    6. Summary
  9. Weather Station
    1. Sensors
      1. Temperature sensor DS18B20
      2. DHT11 humidity sensor
    2. Weather API
    3. Google sheets
    4. Summary
  10. Controlling the Pi
    1. L293D
    2. DC motor
    3. Light-emitting diode
    4. Summary
  11. Security Surveillance
    1. Infrared sensors
      1. Types of IR sensors
    2. Ultrasonic sensors
    3. Buzzer
    4. Raspberry Pi camera module
    5. Wiring up
      1. Interfacing PIR sensor module HC-SR501
      2. Interfacing an active IR sensor
      3. Interfacing an ultrasonic sensor HC-SR04
      4. Interfacing an LED
    6. The code
      1. Camera module code
      2. Email module code
      3. Sensor module code
    7. Summary
  12. Image Recognition
    1. Understanding image recognition
    2. Deep learning
    3. How image recognition works
      1. Gathering data
      2. Organizing data
      3. Building a predictive model
    4. Recognizing an image
    5. Amazon Web Services
    6. AWS S3
    7. AWS Rekognition
    8. Identity and access management
    9. Command line interface
    10. Implementation
      1. Create collection
      2. Upload reference image
      3. Face comparison
      4. Wiring up
        1. Interfacing IR sensor
        2. Interfacing LEDs
        3. Interfacing the Pi camera module
    11. The code
      1. Index face module code
      2. Search face by image module code
      3. S3 bucket module code
      4. Camera module code
      5. Upload reference image module code
      6. Compare image module code
    12. Summary
  13. Bot Building
    1. Car chassis
    2. Pulse-width modulation
      1. Analog signal
      2. Digital signal
    3. Wiring up the bot
      1. Wiring L293D with motor
      2. Wiring L293D with Raspberry Pi
        1. Forward movement
        2. Reverse movement
        3. Right turn
        4. Left turn
        5. Stop
        6. Speed control
    4. Executing the commands
    5. Summary
  14. Security in IoT
    1. The challenges in providing IoT security
      1. Security in endpoint devices – constrained devices
      2. Authorization and authentication
      3. Device firmware upgrade
    2. Secure communication
      1. Data security
      2. High availability
      3. Identifying cyber attacks
      4. Absence of standards
      5. Ignorance from customers and manufactures
    3. Trends and challenges in specific industries
      1. Automotive industries
      2. Smart homes and buildings
    4. Securing Raspberry Pi
      1. Changing the default password
      2. Changing the username
      3. Making sudo require a password
    5. Improving SSH security
      1. Username and password security
      2. Key-based authentication
    6. Setting up a firewall
      1. Fail2Ban
    7. Summary
  15. Other Books You May Enjoy
    1. Leave a review - let other readers know what you think

Product information

  • Title: Internet of Things with Raspberry Pi 3
  • Author(s): Maneesh Rao
  • Release date: April 2018
  • Publisher(s): Packt Publishing
  • ISBN: 9781788627405