Copyright 2017 by McGraw-Hill Education. All rights reserved. Except as permitted under the United States Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written permission of the publisher.
ISBN: 978-1-25-964480-1
MHID: 1-25-964480-4.
The material in this eBook also appears in the print version of this title: ISBN: 978-1-25-964479-5, MHID: 1-25-964479-0.
eBook conversion by codeMantra
Version 1.0
All trademarks are trademarks of their respective owners. Rather than put a trademark symbol after every occurrence of a trademarked name, we use names in an editorial fashion only, and to the benefit of the trademark owner, with no intention of infringement of the trademark. Where such designations appear in this book, they have been printed with initial caps.
McGraw-Hill Education eBooks are available at special quantity discounts to use as premiums and sales promotions or for use in corporate training programs. To contact a representative, please visit the Contact Us page at www.mhprofessional.com .
Information has been obtained by McGraw-Hill Education from sources believed to be reliable. However, because of the possibility of human or mechanical error by our sources, McGraw-Hill Education, or others, McGraw-Hill Education does not guarantee the accuracy, adequacy, or completeness of any information and is not responsible for any errors or omissions or the results obtained from the use of such information.
TERMS OF USE
This is a copyrighted work and McGraw-Hill Education and its licensors reserve all rights in and to the work. Use of this work is subject to these terms. Except as permitted under the Copyright Act of 1976 and the right to store and retrieve one copy of the work, you may not decompile, disassemble, reverse engineer, reproduce, modify, create derivative works based upon, transmit, distribute, disseminate, sell, publish or sublicense the work or any part of it without McGraw-Hill Educations prior consent. You may use the work for your own noncommercial and personal use; any other use of the work is strictly prohibited. Your right to use the work may be terminated if you fail to comply with these terms.
THE WORK IS PROVIDED AS IS. McGRAW-HILL EDUCATION AND ITS LICENSORS MAKE NO GUARANTEES OR WARRANTIES AS TO THE ACCURACY, ADEQUACY OR COMPLETENESS OF OR RESULTS TO BE OBTAINED FROM USING THE WORK, INCLUDING ANY INFORMATION THAT CAN BE ACCESSED THROUGH THE WORK VIA HYPERLINK OR OTHERWISE, AND EXPRESSLY DISCLAIM ANY WARRANTY, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. McGraw-Hill Education and its licensors do not warrant or guarantee that the functions contained in the work will meet your requirements or that its operation will be uninterrupted or error free. Neither McGraw-Hill Education nor its licensors shall be liable to you or anyone else for any inaccuracy, error or omission, regardless of cause, in the work or for any damages resulting therefrom. McGraw-Hill Education has no responsibility for the content of any information accessed through the work. Under no circumstances shall McGraw-Hill Education and/or its licensors be liable for any indirect, incidental, special, punitive, consequential or similar damages that result from the use of or inability to use the work, even if any of them has been advised of the possibility of such damages. This limitation of liability shall apply to any claim or cause whatsoever whether such claim or cause arises in contract, tort or otherwise.
CONTENTS
About the Author
Christopher Rush has a degree in computer science and has spent the last 10 years working for an electronics distribution company as a product manager for single-board computing. He is the author of 30 BeagleBone Black Projects for the Evil Genius and Programming the Photon: Getting Started with the Internet of Things , both also published by McGraw-Hill Education.
PREFACE
This book is the perfect introduction to programming the Intel Galileo development board. The Galileo was Intels first development board aimed for the maker market and based around their own Intel Quark SoC. With built-in Internet of Things capabilities, this board unleashes the powerful hardware expanding its capabilities to Internet-connected hardware.
The Intel Galileo is fully compatible with the Arduino-style programming language while also introducing its own libraries and features for connectivity. The board itself comes with the Arduino footprint for connecting Arduino-compatible hardware such as shields. On its own the board doesnt really do much, but once you learn how to connect hardware it is fully capable of acting as the brain of your projects, controlling things and sending data to cloud services using the on-board Linux.
This book presents you examples using the popular Grove system by Seeed-Studio, which allows you to interconnect hardware without the worries and frustration of dealing with circuits and soldering. Most of the examples use the parts commonly found in the Intel Galileo Grove Starter Kit.
The purpose of this book is to get you started with creating your own hardware projects with the Intel Galileo. You do not need any previous experience with circuits or programming, but general computer skills would be highly advantageous. Programming the IntelGalileo is written to give you a wide variety of experience and a basic understanding of the capabilities of the Intel Galileo board. This book only covers the basics of how to program the board, the assumption being that you will then expand those skills to create your own exciting projects.
I would love to hear your thoughts and comments regarding this book, so I encourage you to contact me through www.rushmakes.com or on Twitter @rushmakes. You can download all the example code from the McGraw-Hill website www.mhprofessional.com/intelgalileo or through my GitHub, https://github.com/ChristopherRush/Programming-the-Intel-Galileo .
Christopher Rush
1
Introduction to the Intel Galileo
The Intel Galileo Gen 2 is a board based on the Intel Quark System-on-Chip (SoC) X1000, a 32-bit Intel Pentium processor system, operating at speeds up to 400 MHz. This Quark system is capable of supporting the Yocto 1.4 Linux distribution that opens up further capabilities to the Intel Galileo board.
The board itself has a built-in Ethernet socket with additional support for Power over Ethernet (PoE), a Universal Serial Bus (USB) 2.0 host port for adding USB devices, a micro-SD slot for memory expansion, a mini PCI express (mPCIe) card slot, 20 digital input/output pins (six PWM outputs with 8/12-bit resolution and six analog inputs with 12-bit resolution), a micro-USB connection for USB client programming, an ICSP header, a JTag header, and two reset tactile buttons, all of which you can see in .
Figure 1.1Intel Galileo Gen 2 hardware features .
The Intel Galileo Gen 2 board also features an integrated real-time clock (RTC), with an optional 3-V coin cell battery for operation between turn-on cycles of the board.