Intel Galileo Networking Cookbook - Marco Schwartz - E-Book

Intel Galileo Networking Cookbook E-Book

Marco Schwartz

0,0
35,99 €

-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.

Mehr erfahren.
Beschreibung

Arduino is an electronic prototyping platform used by millions of people around the world. Intel Galileo is fully Arduino compatible; hence it combines the high performance of Intel with the simplicity of Arduino Software Development Environment. This makes it the ideal platform to build exciting projects, especially in the field of web-based connected applications and the Internet of Things.
The book features several recipes all based on the Intel Galileo board, and that exploit the powerful features of the board. Each chapter explores a given field using the Galileo board.
The book is mainly divided in three parts. The first part is all about learning the basics of the Intel Galileo board, but it uses some of the powerful features of the board such as connecting external sensors and complex hardware devices, compared with more basic Arduino boards.
Then, the book dives into the topics related to networking and the Internet of Things. You will learn how to run a web server on the board and log data using a cloud-based service.
Finally, the book ends with a chapter that aims to build a complete home automation hub using the Galileo board. This chapter uses everything that was learned in the book to make a home automation system using the Galileo board and Arduino.

Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:

EPUB
MOBI

Seitenzahl: 166

Veröffentlichungsjahr: 2015

Bewertungen
0,0
0
0
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



Table of Contents

Intel Galileo Networking Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why Subscribe?
Free Access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Sections
Getting ready
How to do it…
How it works…
There's more…
See also
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
1. Installing and Configuring Linux
Introduction
Configuring your Galileo for the first time
Getting ready
How to do it...
How it works...
See also
Using a simple Linux image
Getting ready
How to do it...
How it works...
There's more...
See also
Using the IoT Linux image
Getting ready
How to do it...
How it works...
There's more...
See also
Accessing the Galileo board remotely
Getting ready
How to do it...
How it works...
There's more...
See also
Installing and updating modules
Getting ready
How to do it...
How it works...
There's more...
See also
Accessing Galileo via Wi-Fi
Getting ready
How to do it...
How it works...
There's more...
Troubleshooting Linux installation issues
How to do it...
2. Connecting External Sensors
Introduction
Using the Arduino IDE with the Galileo board
Getting ready
How to do it...
How it works...
See also
Connecting an analog sensor
Getting ready
How to do it...
How it works...
See also
Connecting a digital sensor
Getting ready
How to do it...
How it works...
See also
Connecting an LCD screen
Getting ready
How to do it...
How it works...
See also
Displaying the temperature on an LCD screen
Getting ready
How to do it...
How it works...
See also
Troubleshooting the usual issues with sensors
How to do it...
3. Controlling Hardware Devices
Introduction
Connecting a relay
Getting ready
How to do it...
How it works...
See also
Connecting a DC motor
Getting ready
How to do it...
How it works...
See also
Connecting an XBee module
Getting ready
How to do it...
How it works...
See also
Controlling a servomotor from a rotating knob
Getting ready
How to do it...
How it works...
See also
Using the SD card reader to log data
Getting ready
How to do it...
How it works...
See also
Troubleshooting the usual issues
The relay doesn't change its state when the sketch is loaded to the board
The DC motor doesn't turn when the sketch is loaded to the board
I can't communicate with Galileo via XBee
The servomotor doesn't turn when the knob is turned
I can't write data to the SD file
4. Creating a Web Server
Introduction
Using the Intel XDK software
Getting ready
How to do it...
How it works...
See also
Running a simple Node.js server
Getting ready
How to do it...
How it works...
See also
Using Express on Galileo
Getting ready
How to do it...
How it works...
See also
Reading pins via a web server
Getting ready
How to do it...
How it works...
See also
Controlling pins via a web server
Getting ready
How to do it...
How it works...
See also
Creating an API to control Galileo
Getting ready
How to do it...
How it works...
See also
Troubleshooting web server issues
Intel XDK doesn't see the Galileo board
The web server doesn't respond
The Express module can't be found
The Galileo API doesn't work properly
5. Hosting Applications on the Galileo Board
Introduction
Creating a file-sharing server
Getting ready
How to do it...
How it works...
See also
Accessing weather data remotely
Getting ready
How to do it...
How it works...
See also
Tweeting from the Galileo board
Getting ready
How to do it...
How it works...
See also
Accessing web APIs via Temboo
Getting ready
How to do it...
How it works...
See also
Accessing more APIs via Temboo
Getting ready
How to do it...
How it works...
Troubleshooting application issues
I can't download files from my file-sharing server
I can't access weather data from Forecast.io
My tweets from the Galileo don't show up
I can't access Temboo from the Galileo board
6. Local Network Monitoring
Introduction
Accessing measured data remotely
Getting ready
How to do it...
How it works...
See also
Logging data in a local database
Getting ready
How to do it...
How it works...
See also
Displaying measurements stored in a database
Getting ready
How to do it...
How it works...
See also
Live data visualization
Getting ready
How to do it...
How it works...
See also
Troubleshooting the usual issues with sensors
I can't get measured data remotely
Issues with MongoDB
The graph doesn't appear on the page
The graph is not refreshed in real-time
7. Cloud Data Monitoring
Introduction
Building and testing hardware for cloud monitoring
Getting ready
How to do it...
How it works...
See also
Sending data to a cloud device
Getting ready
How to do it...
How it works...
See also
Monitoring data remotely from a dashboard
Getting ready
How to do it...
How it works...
See also
Logging data in an online datasheet
Getting ready
How to do it...
How it works...
See also
Controlling your board from anywhere in the world
Getting ready
How to do it...
How it works...
See also
Troubleshooting cloud monitoring issues
Dweet.io is not responding
The dweet.io data does not appear in Freeboard.io
Data is not being logged in my Google spreadsheet
I cannot control my board from Lelylan
8. Building a Home Automation System
Introduction
Choosing the right components
Getting ready
How to do it...
How it works...
See also
Building a Wi-Fi Arduino sensor module
Getting ready
How to do it...
How it works...
See also
Connecting Arduino modules to the Galileo board
Getting ready
How to do it...
How it works...
See also
Building an interface for your home automation system
Getting ready
How to do it...
How it works...
See also
Connecting your home automation system to the Web
Getting ready
How to do it...
How it works...
See also
Accessing your home automation system from anywhere
Getting ready
How to do it...
How it works...
See also
Troubleshooting issues with your home automation system
My Arduino Wi-Fi module can't connect to the Wi-Fi network
The Galileo board can't communicate with the Arduino modules
The graphical interface is not displayed
The external weather data is not displayed
Index

Intel Galileo Networking Cookbook

Intel Galileo Networking Cookbook

Copyright © 2015 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

First published: August 2015

Production reference: 1240815

Published by Packt Publishing Ltd.

Livery Place

35 Livery Street

Birmingham B3 2PB, UK.

ISBN 978-1-78528-119-8

www.packtpub.com

Credits

Author

Marco Schwartz

Reviewers

Tom Collins

Agus Kurniawan

Bharat Sesham

Alex Tereschenko

Commissioning Editor

Edward Bowkett

Acquisition Editor

Harsha Bharwani

Content Development Editor

Shweta Pant

Technical Editor

Narsimha Pai

Copy Editors

Dipti Mankame

Kevin McGowan

Project Coordinator

Sanjeet Rao

Proofreader

Safis Editing

Indexer

Hemangini Bari

Graphics

Sheetal Aute

Production Coordinator

Komal Ramchandani

Cover Work

Komal Ramchandani

About the Author

Marco Schwartz is an electrical engineer, entrepreneur, and blogger. He has a master's degree in electrical engineering and computer science from SUPELEC in France and a master's degree in micro engineering from the EPFL in Switzerland. He has more than 5 years of experience working in the domain of electrical engineering. His interests gravitate around electronics, home automation, the Arduino and the Raspberry Pi platforms, open source hardware projects, and 3D printing. He runs several websites related to Arduino, including the Open Home Automation website, which is dedicated to building home automation systems using open source hardware.

He has written another book on home automation and Arduino, named Arduino Home Automation Projects, Packt Publishing. He has also published a book on how to build Internet of Things projects with Arduino, which is called Internet of Things with the Arduino Yun, Packt Publishing.

About the Reviewers

Tom Collins is an entrepreneur, start-up enthusiast, and cofounder of AllThingsTalk. He received a first-class degree with honors and awards for his graduate exhibition on "The Convergence of Cloud Computing, Smart Devices and the Internet of Things". He has also developed SmartLiving.io project, assuming a jack-of-all-trades role spanning architecture, DevOps, full stack, and mobile development.

Tom's latest mission is to support innovation within start-ups and organizations through the IoT methodology, share toolkits, design patterns, and provide lessons to build IoT solutions.

Agus Kurniawan is an IT security and technology consultant, author, and lecturer. He has experience in various software development projects, producing material for training and workshops and producing technical writing for 14 years. He has been awarded the Microsoft Most Valuable Professional (MVP) award for 11 years in a row. He is involved in some research activities related to networking and security systems at the University of Indonesia. Currently, he's pursuing a PhD program in computer science in Germany. You can visit his blog at http://blog.aguskurniawan.net and his Twitter page at @agusk2010.

Bharat Sesham is enthusiastic and passionate about learning the latest technologies and applying them to solving real-life problems. He has participated in many reputed competitions; some of these are the Intel Embedded Challenge 2014, NASA Space Settlement Challenge 2013/2014, CANSAT 2015, Shell Idea 360 2015, which gave him a practical insight. He has a good knowledge of embedded systems, IoT, and OpenCV. Apart from this, he is also working for two start-ups based on OpenCV.

His blog site is https://bharatsesham.wordpress.com, and his Twitter page is @bharat_sesham.

I would like to thank Packt Publishing for providing this opportunity and I would also like to thank my parents for supporting and encouraging me throughout my journey.

Alex Tereschenko is an avid creator, who is sure that computers can do a lot of good for people when they are interfaced with real-world objects (as opposed to just crunching data in a dusty corner). That's what's driving him in his projects, and this is why embedded systems and the Internet of Things are topics he enjoys the most.

www.PacktPub.com

Support files, eBooks, discount offers, and more

For support files and downloads related to your book, please visit www.PacktPub.com.

Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at <[email protected]> for more details.

At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.

https://www2.packtpub.com/books/subscription/packtlib

Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can search, access, and read Packt's entire library of books.

Why Subscribe?

Fully searchable across every book published by PacktCopy and paste, print, and bookmark contentOn demand and accessible via a web browser

Free Access for Packt account holders

If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view 9 entirely free books. Simply use your login credentials for immediate access.

Preface

Intel Galileo is a great development kit for all your Do-It-Yourself electronics projects. The board has an in-built powerful Intel processor, but is usable with the well-known Arduino software. It is also compatible with most Arduino shields.

This makes it the ideal board for your projects, especially in the fields where you need to use cloud-based services, for example, to store data online. It is therefore a great board for Internet of Things (IoT) applications.

In this book, we are going to start setting up your board and building simple applications with the board, such as running a web server on the board. After this, we'll dive into more complex topics, such as IoT applications. Finally, we'll sum up everything we learned in the book by building a simple home automation system based on the Galileo board.

What this book covers

Chapter 1, Installing and Configuring Linux, explains how to set up your Galileo board and the development environment, so you can start building projects. We will install the Galileo IoT image and install the required software on your computer.

Chapter 2, Connecting External Sensors, will discuss connecting sensors to the board, such as a temperature sensor. We will see how to read data from sensors and use it in our projects.

Chapter 3, Controlling Hardware Devices, covers how to control devices from the Galileo board, such as a relay that can be used to control electrical appliances.

Chapter 4, Creating a Web Server, is dedicated to running a simple web server on the Galileo board. We will see that a server can also be used to control the inputs and outputs of the board.

Chapter 5, Hosting Applications on the Galileo Board, covers how to host useful applications on the board, such as a simple file-sharing server.

Chapter 6, Local Network Monitoring, is dedicated to creating applications to monitor the activity of the Galileo board via the local network connection, for example, you will be able to monitor measurements done by the board in real time.

Chapter 7, Cloud Data Monitoring, is all about connecting your board to cloud services in order to build Internet of Things applications, such as remotely logging data on a cloud platform.

Chapter 8, Building a Home Automation System, sums up all that was done in the book with an application: building a home automation system based on Arduino, using the Galileo board as the "hub" of the system.

What you need for this book

For this entire book, you will need an Intel Galileo board. In the first chapter of the book, you will learn how to install all the required software to configure your board.

You will also need a computer running Windows, Mac OS X, or Linux, as this will be needed to configure your Galileo board.

Who this book is for

This book is intended for those who want to build exciting projects using the Intel Galileo board. It is for people who are already experienced in using more classic Arduino boards and want to extend their knowledge to the Intel Galileo board.

It is also for people who want to learn about electronics and programming, and Intel Galileo is the perfect platform for this.

Sections

In this book, you will find several headings that appear frequently (Getting ready, How to do it, How it works, There's more, and See also).

To give clear instructions on how to complete a recipe, we use these sections as follows:

Getting ready

This section tells you what to expect in the recipe, and describes how to set up any software or any preliminary settings required for the recipe.

How to do it…

This section contains the steps required to follow the recipe.

How it works…

This section usually consists of a detailed explanation of what happened in the previous section.

There's more…

This section consists of additional information about the recipe in order to make the reader more knowledgeable about the recipe.

See also

This section provides helpful links to other useful information for the recipe.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of.

To send us general feedback, simply e-mail <[email protected]>, and mention the book's title in the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files from your account at http://www.packtpub.com for all the Packt Publishing books you have purchased. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

Downloading the color images of this book

We also provide you with a PDF file that has color images of the screenshots/diagrams used in this book. The color images will help you better understand the changes in the output. You can download this file from http://www.packtpub.com/sites/default/files/downloads/1198OS_ColorImages.pdf.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.

To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata section.

Piracy