intro to intel galileo - iot apps - ?· intro to intel galileo - iot apps gerardo carmona irving...

Download Intro to Intel Galileo - IoT Apps - ?· Intro to Intel Galileo - IoT Apps GERARDO CARMONA IRVING LLAMAS…

Post on 08-Mar-2019

212 views

Category:

Documents

0 download

Embed Size (px)

TRANSCRIPT

7/25/2015

1

Intro to Intel Galileo - IoT AppsGERARDO CARMONA

IRVING LLAMAS

Campus Party Guadalajara July, 2015www.makeroboticsprojects.com

Welcome!Campus Party Guadalajara 2015

Campus Party Guadalajara July, 2015www.makeroboticsprojects.com

IntroductionIn this course we will focus on how to get started with the Intel Galileo Gen 2 development board.

Then we will explore some examples using different programming languages like: C/C++

Python

JavaScript

And finally we will program a basic IoT application connecting our board to a mobile phone or tablet using Intel XDK IoT Edition.

Campus Party Guadalajara July, 2015www.makeroboticsprojects.com

7/25/2015

2

Getting Started - HardwareList of hardware: (1) Intel Galileo Gen 2

(1) USB Micro-B Cable

(1) Ethernet cable

(1) SD Card

(1) Led any color

(1) 330 ohms resistor

(1) Push button

(1) 10 Kohms resistor

(1) breadboard

(1) A phone or tablet (Android or iOS)* Optional

Some wires

Campus Party Guadalajara July, 2015www.makeroboticsprojects.com

Getting Started - SoftwareArduino IDE https://www.arduino.cc/en/Main/Software

Intel XDK IoT Edition https://software.intel.com/en-us/html5/xdk-iot

Also we need to install Bonjour Print Services: https://support.apple.com/kb/DL999?viewlocale=en_US&locale=es_US

Drives and Firmware http://bit.ly/Galileo_Driver_Firmware

SD Card Image for IoT http://bit.ly/Galileo_SD

Campus Party Guadalajara July, 2015www.makeroboticsprojects.com

What is Intel Galileo?A brief introduction to the board

Campus Party Guadalajara July, 2015www.makeroboticsprojects.com

7/25/2015

3

What is Intel Galileo?The Intel Galileo Gen 2 development board is a microcontroller board based on the Intel QuarkSoC X1000 application processor, a 32-bit Intel Pentiumbrand system on a chip (SoC). It is the first board based on Intel architecture designed to be hardware and software pin-compatible with shields designed for the Arduino Uno* R3.

This platform provides the ease of Intel architecture development through support for the Microsoft Windows*, Mac OS*, and Linux* host operating systems. It also brings the simplicity of the Arduino integrated development environment (IDE) software.

From Intel website, Galileo overview

Campus Party Guadalajara July, 2015www.makeroboticsprojects.com

What is Intel Galileo?

Intel Galileo Gen 2From Intel website

Campus Party Guadalajara July, 2015www.makeroboticsprojects.com

Galileo Gen 2 Components

Ethernet port

6 pin FTDI header

USB device port USB host port Pin 13 LED, Power LED and SD card LED

Digital pins, some PWM, Serial, I2C and others

RAM memory

Quark SoC X1000

Power pins & analog pins

Reset button (sketch)

7 to 15 V input

Micro SD Card slot

Reboot Linux button

Campus Party Guadalajara July, 2015www.makeroboticsprojects.com

7/25/2015

4

Intel Galileo Gen 1

5 V input

Micro SD slot

SD card LED, powerLED and Reset button

Ethernet

RS-232 USB client USB Host

Digital pins, some PWM, Serial, I2C and others

Power pins & analog pins

Quark SoC X1000

Reboot

RAM memory

Pin 13 LED

Campus Party Guadalajara July, 2015www.makeroboticsprojects.com

Before we startPreparing the Intel Galileo board

Campus Party Guadalajara July, 2015www.makeroboticsprojects.com

Install Driver1. To install the driver go to:

2. Then click Intel Galileo Firmware Updater Tool 1.0.4 link to start download.

http://bit.ly/Galileo_Driver_Firmware

Campus Party Guadalajara July, 2015www.makeroboticsprojects.com

7/25/2015

5

Install Driver1. Connect your wall adapter to your Intel Galileo board.

2. Connect the USB cable to your computer and the board

3. Wait a few seconds until your PC recognizes the board

4. Update driver software going to Device manager

5. Locate Intel Galileo, right click and select update driver software

6. In the new window select second option Search controller software on my computer

7. Locate the files you just decompress under driver folder

Campus Party Guadalajara July, 2015www.makeroboticsprojects.com

Update Firmware1. In the same folder, you have file named firmware-updater-1.0.4.exe

2. Fill the next information:

Campus Party Guadalajara July, 2015www.makeroboticsprojects.com

Making a bootable micro SD CardGet the latest image for IoT Edition here:

Follow the instructions on the web page, you will need to download Win32DiskImager in order to burn the image into a SD card.

http://bit.ly/Galileo_SD

Campus Party Guadalajara July, 2015www.makeroboticsprojects.com

7/25/2015

6

Update DriverNow with your Intel Galileo on and connected to your computer, navigate to My Computer and you will notice that you have a device named Intel Galileo, open it and you will find some folders, one of those folder is named drivers, you will need to update your driver software using this files.

Campus Party Guadalajara July, 2015www.makeroboticsprojects.com

Arduino IDEFirst program Blink an Led

Campus Party Guadalajara July, 2015www.makeroboticsprojects.com

Blink ExampleOpen example: File >> Examples >> 01.Basics >> Blink

Upload file.

You should see the Led located near by the big USB port, it is marked as L, blinking.

That means that everything is working fine.

Campus Party Guadalajara July, 2015www.makeroboticsprojects.com

7/25/2015

7

Beyond ArduinoArduino + Linux

Campus Party Guadalajara July, 2015www.makeroboticsprojects.com

Arduino + LinuxYou can combine the easy to use of Arduino and the power of an Operative System like Linux.

Open example: 01-Arduino-Linux-get-ip.ino

Campus Party Guadalajara July, 2015www.makeroboticsprojects.com

Secure Shell (SSH)Connecting to the Intel Galileo Linux side

Campus Party Guadalajara July, 2015www.makeroboticsprojects.com

7/25/2015

8

Secure Shell (SSH)Secure Shell is a encrypted network protocol that initializes sessions on remote machines.

We can connect to our Intel Galileo Linux-side using SSH. Follow the next steps:

1) Connect your Intel Galileo to your local network

2) Get PuTTy o r any other SSH client, for PuTTY go to:

http://bit.ly/Galileo_SD

Campus Party Guadalajara July, 2015www.makeroboticsprojects.com

Secure Shell (SSH)3) Open PuTTy and configure as shown

1. Select SSH2. Write Galileos IP

address3. Leave port as 224. Click Open

1

2 3

4

Campus Party Guadalajara July, 2015www.makeroboticsprojects.com

Secure Shell (SSH)4) The following window opens

5) Type root in username and hit enter

Campus Party Guadalajara July, 2015www.makeroboticsprojects.com

7/25/2015

9

Secure Shell (SSH)6) Now you are inside Linux Yocto Project

Campus Party Guadalajara July, 2015www.makeroboticsprojects.com

Playing with LinuxTesting some basic commands in terminal

Campus Party Guadalajara July, 2015www.makeroboticsprojects.com

Playing with LinuxNow we can create files, folders, navigate though the Linux file system.

First command to try is:

It will display the content of the folder, in this case will show you some files that I created in the past.

$ ls

Campus Party Guadalajara July, 2015www.makeroboticsprojects.com

7/25/2015

10

Playing with LinuxNow lets create a new folder named gerardo, type:

Now type ls again to see the content of the folder again.

$ mkdir gerardo

Campus Party Guadalajara July, 2015www.makeroboticsprojects.com

Vi EditorLets create a new file hello.txt and write on it some text. We are going to use a text editor called vi, so type:

You will see an empty file just like:

$ vi hello.txt

Campus Party Guadalajara July, 2015www.makeroboticsprojects.com

Vi EditorTo start editing this file press i (insert mode).

Now you can type your text, after you finish, to save and exit file:

Press escape key (exit editing mode)

Type :wq (write and quit command)

Campus Party Guadalajara July, 2015www.makeroboticsprojects.com

7/25/2015

11

Other Linux CommandsIf you want to display the content of a file in terminal write:

Campus Party Guadalajara July, 2015www.makeroboticsprojects.com

Other commandsYou can find more Linux commands in the file Linux-commands.pdf

Campus Party Guadalajara July, 2015www.makeroboticsprojects.com

Other Programing Languages C/C++, Python and node.js

Campus Party Guadalajara July, 2015www.makeroboticsprojects.com

7/25/2015

12

Other Programing LanguagesLets make a simple program that prints Hello world! to the console using different languages.

Campus Party Guadalajara July, 2015www.makeroboticsprojects.com

CCreate a new file named hello.c using vi

Type the following code:

#include

int main()

{

printf("Hello world!\n");

return 0;

}

Campus Party Guadalajara July, 2015www.makeroboticsprojects.com

CNow we need to compile file using gcc com

Recommended

View more >