Intel Galileo Essentials

By Dr. Richard Grimmett
    What do you get with a Packt Subscription?

  • Instant access to this title and 7,500+ eBooks & Videos
  • Constantly updated with 100+ new titles each month
  • Breadth and depth in over 1,000+ technologies
  1. Free Chapter
    Getting Started with the Galileo
About this book

Intel Galileo Essentials provides step-by-step instructions on how to use the Galileo in Do-It-Yourself electronics projects. We begin by powering up the Galileo and loading the development system to get started. Post this, we look at GPIO capability in general along with the basics of programming the GPIO pins, also learning how to connect external HW to the GPIO pins. Moving on, we begin connecting a display to the Galileo, while learning the important points such as importing the support files, programming text and graphics, and getting input from a touchscreen. More significantly, we start controlling motors, adding sensors, and learning how to communicate wirelessly with your Galileo projects.

We conclude by building a wide variety of projects with the Galileo such as controlling servos for walking robots, hacking toy robots with the Galileo, and creating an ROV (Remotely Operated Vehicle) with the Galileo.

Publication date:
February 2015


Chapter 1. Getting Started with the Galileo

You've chosen Intel's new Galileo processor board and you are ready to start some amazing projects. However, you might be new to this kind of processor, or you might have used another similar processor but not the Galileo. This book is designed to lead you step-by-step through a number of examples that will provide you with the knowledge you need to access the power of the Galileo. You'll also learn how to add additional hardware to sense the world around you, display information, and even control motors or servos.

In this chapter, you'll start by unpacking and connecting the Galileo to your host machine, then you'll learn how to use the Galileo from your remote computer. If you know how to use Mac or Linux machines, this chapter will show you how to use them. You'll take a peek into the internals of the Galileo and learn about the Linux machine hiding behind the simple Galileo exterior.

For this chapter, the objectives are as follows:

  • Unpacking and connecting the Galileo to a host computer

  • Loading and configuring the Galileo IDE, based on the Arduino IDE

  • Downloading and running some simple example programs

  • Taking a peek at the Linux machine at the heart of the Galileo


Unpacking and connecting the Galileo

The Galileo is packaged with a power cable. Here is a picture of the board:

This is how the board will look without the adapter:


This particular Galileo is a Gen 2 board. This version is a slightly improved version of the original Gen 1 board, and has a few connector changes. The examples in this book have been tested on both versions, and should work unless noted.

The power connection is very straightforward. However, you'll also need another cable to start working with the Galileo. This is a USB-to-micro USB cable. Here is a picture:

This cable will go between the Galileo and the host machine to develop and debug the code. Here are the specific connections:

To prepare for developing the Galileo, plug the power into an outlet and the board. A green power LED close to the USB connector should light. Now you are ready to connect your board to a remote computer to begin programming The next sections will cover how to connect your Galileo to a computer running Windows, OS X, or Linux.


Downloading the software and connecting the Galileo to a Windows machine

The first step in setting up your remote computer for development with the Galileo is to download the Integrated Development Environment (IDE) software from Choose the download link for Windows. This will download the IDE as well as the drivers for the Galileo. When this file is downloaded, unzip the file using an archive manager (for example 7-zip) to a location on your C:. This will un-archive a set of files and directories under the arduino-1.5.3-Intel.1.0.3 directory structure.

Plug the USB from the Galileo into your computer. If you are using a newer version of Microsoft Windows, when you plug the Galileo into the system it will try to install the drivers automatically. The device will fail to install. You'll need to install the drivers manually, using the following steps:

  1. Select the Start | Control Panel | Device Manager inside Windows. Under the Other devices menu, select the Gadget Serial v2.4 device. Then select Update Driver Software, as shown in the following screenshot:

  2. Next click on Browse my computer for driver software.

  3. Click on Browse… next to the file path input box.

  4. If you installed your Arduino IDE folder in the root of your hard drive, navigate to C:\ardunio-1.5.3\hardware\arduino\x86\tools and click on OK. If you have installed it in a different location, navigate to this directory, select it, and then click on OK.

You will get a security warning; click on OK and the drivers will install. When your drivers are installed, you should see the following device when you navigate to Start Menu | Devices and Printers:

In this case, the device is connected to COM port 34. Note down the COM port the Galileo is connected to as you'll need that in a minute.


Downloading the software and connecting the Galileo to a Mac

If you are using an OS X machine, download the OS X version of the IDE software at Unzip this file into your Applications folder. Then connect the 5V power to the Galileo. Connect the USB cable from the Galileo to an available USB socket on your computer. Wait for a minute while the Galileo boots up. To verify that the Galileo has loaded properly, open the System Information window. Then check under the USB tab for a Gadget Serial v2.4 entry as demonstrated in the following screenshot:

You should also check under the Network tab to find the device name of your Galileo. It should be something like usbmodemXXXX. Note down this name as you will need it to select the correct port later when you configure the connection to the Galileo. You are now ready to run the software.


Downloading the software and connecting the Galileo to a Linux machine

If you are using a Linux machine, download the Linux version of the IDE software from Unpack this file using tar -zxvf arduino-1.5.3-linux32.tar.gz. You will also need to disable the modem manager on most Linux distributions to enable uploading to the board. How you do this will vary by distribution but, if you are using the Ubuntu distribution, type sudo apt-get remove modemmanager.

To connect the Galileo board to the Linux machine, simply plug in the USB connector to one of the USB ports on the Linux machine. Open a terminal and type sudo ls /dev/ttyACM* and this will list the device connected to the machine. You should note down this value as you will later need to specify the port.


Running the IDE for the Galileo

Now that the device is installed, you can run the IDE. Select and run the program based on the type of machine you are using. The IDE should start and you should see something resembling the following screenshot:

This is the environment you will use to develop your applications. You can use this IDE to compile the code, upload it to the device, and then run it.

Setting the IDE to connect to your board

The first thing you'll need to do is set the IDE to create code for the proper Galileo board. Fortunately, the IDE lets you set that by choosing the board. To do this, navigate to Tools | Board | Intel® Galileo Gen2, as shown in the following screenshot:

The next step, selecting a port to connect the board to the IDE, will depend on the type of operating system you are using.

Selecting the proper COM port for Windows

To specify the port for Windows, navigate to Tools | Serial Port | COM23, (the port you noted earlier) as shown in the following screenshot:

The IDE should now indicate that you are using the Galileo on COM23 in the lower-right corner of the IDE, as in the preceding screenshot.

Selecting the proper COM port for the Mac

To specify the port for Mac, navigate to Tools | Serial Port | and select the port you noted earlier when you installed the drivers. The IDE should now indicate that you are using the Galileo on the proper port in the lower-right corner of the IDE.

Selecting the proper COM port for a Linux Machine

To specify the port for a Linux machine, navigate to Tools | Serial Port | and select the port you noted earlier when you first connected to the board. The IDE should now indicate that you are using the Galileo on the proper port in the lower-right corner of the IDE.


Updating the firmware

The first thing you'll want to do is update the firmware on the Galileo. To do this, select Help | Galileo Firmware Update, as shown in the following screenshot:

Having the latest firmware is always a good idea; you might want to repeat this step every week or so just to make sure you have the latest.

Opening and uploading a file to the Galileo

Now that your board is connected and you are running the latest firmware, you can open and upload a simple example file. It is called the blink application. It has already been written for you, so you won't need to do any coding.

To get the blink application, perform the following steps:

  1. Navigate to File | Examples | 01.Basics | Blink, as shown in the following screenshot:

  2. You should then see the Blink code in the IDE window, as in the following screenshot:

  3. Select the Upload button, as in the following screenshot:

  4. Once you have uploaded the file, it will tell you in the lower-left corner of the IDE display that the file is uploaded, as in the following screenshot:

When the program is uploaded, it will automatically start running and the green LED that is positioned close to the USB connection on the Galileo will start blinking. The following images shows the LED:

You have now successfully uploaded your first program to your Galileo!


Accessing the Galileo's Linux capabilities

There are several differences between the Galileo and the more common Arduino board that many of you might be familiar with. The Galileo has significantly more processing power. However, it also starts up into a Linux operating system, and then exposes its programming environment in an Arduino-like interface. While you'll almost exclusively use the Arduino IDE interface in this book, you can also access the Linux capabilities of the Galileo. You'll learn more about this in Chapter 7, Going Further with Galileo.



You've completed the next stage of your journey. You have your Galileo up-and-talking with your external computer, and know how to connect to the IDE to create code. Your next step will be learning how to access the GPIO pins so that you can interact with the outside world.

About the Author
  • Dr. Richard Grimmett

    Dr. Richard Grimmett has been fascinated by computers and electronics from his very first programming project, which used Fortran on punch cards. He has bachelor's and master's degrees in electrical engineering and a PhD in leadership studies. He also has 26 years of experience in the radar and telecommunications industries, and even has one of the original brick phones. He now teaches computer science and electrical engineering at Brigham Young University, Idaho, where his office is filled with his many robotics projects.

    Browse publications by this author
Intel Galileo Essentials
Unlock this book and the full library FREE for 7 days
Start now