IOT (Internet of Things) Programming
A Simple and Fast Way of Learning IOT
David Etter
Copyright©2016 by David Etter
All Rights Reserved
Copyright © 2016 by David Etter
All rights reserved. No part of this publication may be reproduced, distributed, or transmitted in any form
or by any means, including photocopying, recording, or other electronic or mechanical methods, without
the prior written permission of the author, except in the case of brief quotations embodied in critical
reviews and certain other noncommercial uses permitted by copyright law.
Table of Contents
Introduction
Chapter 1- What is the IOT?
Chapter 2- Programming Connected Devices
Chapter 3- Programming Raspberry Pi with C and Python
Chapter 4- Raspberry Pi with Raspbian OS
Chapter 5- Galileo, Windows, and the IOT
Chapter 7- IOT Temperature Controller
Conclusion
Disclaimer
While all attempts have been made to verify the information provided in this book, the author does
assume any responsibility for errors, omissions, or contrary interpretations of the subject matter contained
within. The information provided in this book is for educational and entertainment purposes only. The
reader is responsible for his or her own actions and the author does not accept any responsibilities for any
liabilities or damages, real or perceived, resulting from the use of this information.
The trademarks that are used are without any consent, and the publication of the trademark is without
permission or backing by the trademark owner. All trademarks and brands within this book are for
clarifying purposes only and are the owned by the owners themselves, not affiliated with this document.
Introduction
There is a need for us to come up with mechanisms by which to sense changes in the factors surrounding
us and then take an action based on that. With the IoT, this is possible. In this case, we have a network
made up of physical devices, sensors, and other devices which help us to accomplish our tasks. When
these devices are connected and programmed, then we are capable of taking data from the environment,
transmiting it, and then making a decision based on that. This shows how interesting it is for one to learn
IoT programming. This book discusses this in detail. Enjoy reading!
Chapter 1- What is the IOT?
IoT stands for the “Internet of Things” and it is just a network made up of physical devices which have
been embedded with software, sensors, and electronics, allowing the devices to exchange data among
themselves. With these, it becomes easy for us to integrate computer-based systems with the physical
systems of the world.
This technology has been powered by leading technologies such as Big data and Hadoop, and this is
expected to be the next greatest thing to impact our lives in a number of ways. Although the IoT is a new
technology, it is believed that it will bring a huge change in the history of computing. Sensors built-in to
automobiles, implants for monitoring the heart, biochip transponders, and smart thermostat systems are
examples of these. It is possible for such devices to be tailor-made so as to meet the needs of the business.
The expectation is that IoT devices will be in a position to communicate with humans just as it happens
with real world devices. IoT devices are also expected to have sensors, and these are expected to capture
data such as pulse rate, the temperature of the body, and they should further transmit such data. The
devices should be capable of making decisions, and exercising control computation. It is believed that
the controllers will be used for the purpose of switching the devices. The devices should also have the
capability of storing data.
Chapter 2- Programming Connected Devices
Before beginning to do this, we should first prepare our environment. We want to demonstrate this using
Arduino and ArdOS.
Arduino is a hardware platform designed for the purpose of prototyping and hobby projects, but one can
still use it for designing more complex hardware.
Begin by downloading the latest version of the Arduino IDE from its official website. For Windows users,
you just have to download an installer, which has a FTDI USB driver and the IDE itself. Make sure that
you have installed the USB driver which is responsible for enabling communications between the IDE
and the Arduino device.
After installation of the software, plug the Arduino’s USB cable into the laptop. You will see a pop-up
saying “installing driver.” After this completes, open the Device Manager by clicking on “start->right
click on the Computer icon->Properties->Device manager.”
We can then configure the IDE so that we can start to program.
Launch the IDE. From “Tools->Boards,” choose the board which you need to connect to.
Once the board has been selected, set the right serial port.