To get the most out of this book, you'll need to understand basic programming concepts such as variables, conditions, loops, and functions. You might have gained this knowledge by reading an Arduino book for complete beginners before that explained those concepts in detail. There are many books on getting started with Arduino for you to choose from.
If you run into any problems that you cannot solve yourself, feel free to ask for help on the book's repository on GitHub (https://github.com/PacktPublishing/Hands-on-IOT-with-MQTT) by opening an issue, and I will try to help you. To do so, you will need to create a GitHub account (if you do not already have one).Â
You can find all the required pieces of software, along with instructions on how to install them, in Chapter 4, Setting up a Lab Environment. If you skip the first hands-on project in Chapter 5, Building Your Own Automatic Pet Food Dispenser, starting directly with the second or third one (in Chapters 6, Building a Smart E-Ink To-Do List, and Chapter 7, Building a Smart Productivity Cube, Part 1 and Chapter 8, Building a Smart Productivity Cube, Part 2 ), please make sure to also follow the instructions on how to set up MQTT and the Wi-Fi library at the beginning of Chapter 5, Building Your Own Automatic Pet Food Dispenser.
You will get the most out of this book by reading Chapter 1, The Internet of Things in a Nutshell, to Chapter 5, Building Your Own Automatic Pet Food Dispenser, in a linear way. Chapter 6, Building a Smart E-Ink To-Do List, to Chapter 9, Presenting Your Own Prototype, can be read in any order you like.
You can download the example code files for this book from your account at www.packt.com. If you purchased this book elsewhere, you can visit www.packt.com/support and register to have the files emailed directly to you.
You can download the code files by following these steps:
- Log in or register at www.packt.com.
- Select the Support tab.
- Click on Code Downloads.
- Enter the name of the book in the Search box and follow the onscreen instructions.
Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:
- WinRAR/7-Zip for Windows
- Zipeg/iZip/UnRarX for macOS
- 7-Zip/PeaZip for Linux
The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/Hands-On-Internet-of-Things-with-MQTT. In case there is an update to the code, it will be updated on the existing GitHub repository. If you want to make sure to have the latest code you should download it from GitHub.
We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!
We also provide a PDF file that has color images of the screenshots/diagrams used in this book. You can download it here: https://static.packt-cdn.com/downloads/9781789341782_ColorImages.pdf.
Visit the following link to check out videos of the code being run:
http://bit.ly/2oSjufZ
There are a number of text conventions used throughout this book.
CodeInText: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: "So, often, it is better to rewrite delay() calls to use a custom timer instead of using the millis() function."
A block of code is set as follows:
if temperature < 5°C {
send me a reminder to use beanie and gloves
}
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
if (inputValue == 1) {
lastTimeOpenend = millis();
isOpen = true;
myservo.write(90);
}
Any command-line input or output is written as follows:
mosquitto_pub
Bold: Indicates a new term, an important word, or words that you see onscreen. For example, words in menus or dialog boxes appear in the text like this. Here is an example: "Click on Tools | Serial Monitor to open the serial monitor."
Warnings or important notes appear like this.
Tips and tricks appear like this.