Git Product home page Git Product logo

hands-on-internet-of-things-with-mqtt's Introduction

Hands-On Internet of Things with MQTT

Hands-On Internet of Things with MQTT

This is the code repository for Hands-On Internet of Things with MQTT, published by Packt.

Build connected IoT devices with Arduino and MQ Telemetry Transport (MQTT)

What is this book about?

MQ Telemetry Transport (MQTT) is a lightweight messaging protocol for smart devices that can be used to build exciting, highly scalable Internet of Things (IoT) projects.

This book will get you started with a quick introduction to the concepts of IoT and MQTT and explain how the latter can help you build your own internet-connected prototypes. As you advance, you’ll gain insights into how microcontrollers communicate, and you'll get to grips with the different messaging protocols and techniques involved. Once you are well-versed with the essential concepts, you’ll be able to put what you’ve learned into practice by building three projects from scratch, including an automatic pet food dispenser and a smart e-ink to-do display. You’ll also discover how to present your own prototypes professionally. In addition to this, you'll learn how to use technologies from third-party web service providers, along with other rapid prototyping technologies, such as laser cutting, 3D printing, and PCB production.

By the end of this book, you’ll have gained hands-on experience in using MQTT to build your own IoT prototypes.

This book covers the following exciting features:

  • Explore MQTT programming with Arduino
  • Discover how to make your prototypes talk to each other
  • Send MQTT messages from your smartphone to your prototypes
  • Discover how you can make websites interact with your prototypes
  • Learn about MQTT servers, libraries, and apps
  • Explore tools such as laser cutting and 3D printing in order to build robust prototype cases

If you feel this book is for you, get your copy today!

https://www.packtpub.com/

Instructions and Navigations

All of the code is organized into folders. For example, Ch05.

Following is what you need for this book:

This book is ideal for readers who want to start creating internet-connected projects themselves, but only have a little bit of experience of programming and using the Arduino IDE. You do not need to have a computer science background to follow along. Simply curiosity and a basic understanding of programming in Arduino will be enough. If you understand basic programming concepts such as variables, loops, conditions, and functions, then you will have no problem following along.

Some of the chapters touch on a lot of different topics. I do not expect you to understand every single bit in detail. The goal here is to give you a general overview of related technologies and techniques, so you can dive into any of the topics after finishing the book. You can look at it as a starting point for IoT prototyping.

For an intermediate or professional programmer, the pace of the hands-on projects in this book might feel a bit slow, but there is plenty of relevant information for you in the theoretical chapters as well, including how to use MQTT.

With the following software and hardware list you can run all code files present in the book:

Software and Hardware List

Chapter Software/Hardware required OS required
1 Arduino 1.x Windows/macOS/(Linux not tested)
2 Arduino MKR 1010 Wifi (Development Board) Drivers (latest) Windows/macOS/(Linux not tested)
3 Mosquitto v1.5.x Windows/macOS/(Linux not tested)
4 MQTT Dash Windows/macOS/(Linux not tested)
7 Arduino library: Adafruit_GFX v1.3.x (v1.4.x is probably working as well) Windows/macOS/(Linux not tested)

We also provide a PDF file that has color images of the screenshots/diagrams used in this book. Click here to download it.

Related products

Get to Know the Author

Tim Pulver is a Berlin-based freelance interaction designer and developer. In his work, he combines his physical prototyping experience and knowledge of interface design with modern technologies such as 3D printing, laser cutting, web technologies, and machine learning to create unique interactive experiences. In recent years, he has worked on interactive data visualizations, web-based audiovisual experiences, musical interfaces, and cables— an innovative browser-based visual programming language that enables the creation of interactive audiovisual prototypes without writing any code. He holds a Bachelor of Arts degree in interface design from the University of Applied Sciences in Potsdam, Germany.


Suggestions and Feedback

Click here if you have any feedback or suggestions.

Download a free PDF

If you have already purchased a print or Kindle version of this book, you can get a DRM-free PDF version at no cost.
Simply click on the link to claim your free PDF.

https://packt.link/free-ebook/9781789341782

hands-on-internet-of-things-with-mqtt's People

Contributors

packt-itservice avatar packtutkarshr avatar riyankhan avatar timpulver avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hands-on-internet-of-things-with-mqtt's Issues

Image store

This is an issue just to store images associated with the repository (see Gist).

Good quality cover:

cover

Low quality cover (148px width):
cover_148

Connecting to Shiftr.io Cloud

In chapter 4 you show how to configure Shiftr.io but it is the legacy version. I am trying to connect with the new cloud version and it won't connect. If possible, could you show the code for the new Shiftr.io configuration? I am unable to connect to any instance. Thanks in advance for your help.

WaveShare 4.2_Inch Screen not displaying when loaded with ch6_01_example_reduce script

Hi,
I've recently pick up this book and purchased the necessary components to do the projects in the book. I.ve be having some trouble getting the Arduino MKR WiFi 1010 script to produce the "Hello World" display on the WaveShare 4.2Inch color display. The script loaded from the IDE (Arduino 1.8.19) into the MKR 1100, but the e-paper screen just would not display the expected output.

I have contacted the vendor who supplied both the Arduino and the screen and gone through sever exchanges to verify that the components are working properly using the test script from WaveShare publications. I must clarify that I had not acquired the 4.2Inch e-paper module. Instead, I have acquired the 3-color raw screen and the paring Universal e-Paper Driver Hat.

Has anyone had similar issues either using e-paper module or using the same configuration as I have and found a solution to the issue I'm facing. Kindly assist

Thanks

Ch5 - Servo motor code not running properly

Hi,
I am currently on Chapter 5. I bought all the recommended parts including the Arduino MKR WiFi 1010 board.
I tested the servo motor with the sweep code and everything seemed fine.

I wrote the code for normal servo angle control (ch5_01_servo_serial) but it does not behave in the manner it is supposed to as per the code. When i enter 1 in the serial monitor, the servo rotates only 90 degrees (even though i say servo.write(180) in my code, and then it rotates 180 in the other direction, waits for about 1 second and then returns to zero.
When i enter 0 in the serial monitor, it rotates 90degrees and then return to zero.
Code pasted below. Can you help me understand what am I doing wrong?
This is the motor I bought - https://www.sparkfun.com/products/14760

#include <Servo.h>
Servo myservo;

void setup() {
Serial.begin(9600);
myservo.attach(9);
}

void loop() {
// myservo.write(0);
while (Serial.available() > 0) {
int inputValue = Serial.parseInt();
if (inputValue == 1) {
myservo.write(180);
} else {
myservo.write(0);

}

}
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.