Book Image

Internet of Things with the Arduino Yún

By : Marco Schwartz
Book Image

Internet of Things with the Arduino Yún

By: Marco Schwartz

Overview of this book

<p>Internet of Things (IoT) is currently a growing trend in the technology space, and the Arduino Yún is the perfect board to get started with building IoT projects. This book covers many of the powerful features of the Arduino Yún via four exciting projects. The first project is all about sending weather measurements data to a Google Docs spreadsheet for easy online visualization. The second one is about building an energy consumption meter and controlling devices remotely. The third focuses on the field of security, by helping you to build a camera that is triggered by motion and that uploads pictures automatically to Dropbox. Finally, the last project is in relation with the field of robotics, and focuses on building a robot that is controlled via Wi-Fi. <br /><br />The main focus of this book is to teach everything you need to know to build complex projects using the Arduino Yún, organized around the fields of home automation, security, and robotics.</p>
Table of Contents (11 chapters)

The required hardware and software components


Of course, you need to have your Arduino Yún board ready on your desk along with a micro USB cable to do the initial programming and testing. Also, we recommend that you have a power socket to the micro USB adapter so that you can power on your Arduino Yún directly from the wall without having your computer lying around. This will be useful at the end of the project, as you will want your Arduino Yún board to perform measurements autonomously.

You will then need the different sensors which will be used to sense data about the environment. For this project, we are going to use a DHT11 sensor to measure temperature and humidity and a simple photocell to measure light levels. DHT11 is a very cheap digital temperature and humidity sensor that is widely used with the Arduino platform. You can also use a DHT22 sensor, which is more precise, as the Arduino library is the same for both sensors. There are several manufacturers for these sensors, but you can find them easily, for example, on SparkFun or Adafruit. For the photocell, you can use any brand that you wish; it just needs to be a component that changes its resistance according to the intensity of the ambient light.

To make the DHT11 sensor and photocell work, we will need a 4.7k Ohm resistor and a 10k Ohm resistor as well. You will also need a small breadboard with at least two power rails on the side and some male-male jumper wires to make the electrical connections between the different components.

On the software side, you will need the latest beta version of the Arduino IDE, which is the only IDE that supports the Arduino Yún board (we used Version 1.5.5 when doing this project). You will also need the DHT library for the DHT11 sensor, which can be downloaded from https://github.com/adafruit/DHT-sensor-library.

To install the library, simply unzip the files and extract the DHT folder to your libraries folder in your main Arduino folder.