1. Getting Started with Intel IoT : Intel Galileo Gen 2
Kunal N Dekate
ETRX Dept.
GHRCE,Nagpur
2. Smart Systems and the Internet of Things are
driven by a combinations of :
1 Sensor
& Actuators
2 Connectivity 3 People &
Processes
3. 1 SENSORS & Actuators
We are giving our world a digital nervous system. Location data using GPS sensors. Eyes and ears
using cameras and microphones, along with sensory organs that can measure everything from
temperature to pressure changes.
6. The interactions between these
r# SENSORS ♦ CONNECTIVITY ♦ PEOPLE + PROCESSES
entities are creating new types of smart
applications and services.
Starting with popular connected devices already on the market
SMART THERMOSTATS
nest
o
Save resources and money
on your heating bills by
adapting to your usage
patterns and turning the
temperature down when
you're away from home.
CONNECTED CARS
CRR 2GO
Tracked and rented
using a smartphone.
Car2Go also handles
billing, parking and
insurance
automatically.
ACTIVITY TRACKERS
% BASIS
Continuously capture
heart rate patterns,
activity levels, calorie
expenditure and skin
temperature on your
wrist 24/7.
SMART OUTLETS
A"belkin
I i
Remotely turn any device
or appliance on or off.
Track a device's energy
usage and receive
personalized notifications
from your smartphone.
PARKING SENSORS
STREETLINE
Using embedded street sensors,
users can identify real-time
availability of parking spaces on
their phone. City officials can
manage and price their resources
based on actual use.
9. Intel® Galileo Development Board – Gen 2
Board I/O:
Mechanically compatible with Arduino Uno
20 digital input/output pins including 6 pins as PWM outputs
6 analog inputs
2 UART (RX/TX)
1 I2C
1 ICSP 6-pin header (SPI)
USB device connector (Host)
Micro USB device connector (client)
SD Card connector
DC power jack (7V – 15V DC input)
10. Specifications:
Attachment : Arduino-Compatible headers containing
1. 20 digital I/O
2. 6 Analog Inputs (A0-A5)
3. 6 PWM with 12
4. 1 Serial Peripheral Interface (SPI) Master
5. 1 I2C (Inter-integrated Circuit) master
Processor Features
1. Model : Intel Quark SOC X1000
2. Speed : 400 MHz
3. Cores/Threds : 1/1
4. Instruction set Architecture : 32 bit intel pentium process
5. L1 Catche : 16 K
6. SRAM : 512 KB on-die, embedded
7. Technolgy Suported: : Integrated Real Time Clock
11. Continue….Specifications:
Storage Options
1. Firmware/Bootloader : 8 MB NOR Flash
2. DRAM : 256 MB DDR3; 800 MT/s
3. SD Card (Optional) : Up to 32 GB
4. USB : Compatible with any USB 2.0 (USB drive/stick)
5. EEPROM : 8 KB (programmed via the EEPROM Library)
Power & Buttons :
1. Power : Jack with increased range ( 7 to 12 V)
2. Power : Supports Power over Ethernet
3. Power : Header for RTC power
4. Buttons : Reset for sketch and attached shield resets Ethernet
5. Buttons : Reboot to reset the Intel Quark SoC X1000
12. Setting up the developer environment
Setting up the Galileo board
13. Connect the SD card in your computer – copy the IDE
file correspondent to your OS; for Windows, copy win-
driver too
15. Now connect your environment
USB <-> Serial cable
Ethernet
SD Card
Power
Serial
3
1
2
4
Ref.: https://software.intel.com/en-us/iot-c-eclipse
16. Installing drivers for Intel Galileo Gen 2
1. Download drivers from
Intel Official website
2. After Installation go to
device manager of
System
3. In other devices
select Gadget Serial
4. Right Click and click
on update drivers
5. Browse from the
location where you
have saved driver .
6. And you are done.
17.
18. Galileo Arduino IDE settings :
In Galileo Arduino IDE,
1. go to Tools pull-down menu at
the top
2. Select Board, and make sure
“Intel Galileo Gen2” is selected.
If not, select it.
3. Also from the Tools->Serial
Port menu, select the
“COMx”. Here x is the number
of the COM Port designated for
Intel Galileo Hardware during
device driver installation.
4. It is COM17 in my system.
22. Examples:
1. Blinking of LED
void setup() {
// initialize digital pin 13 as an output.
pinMode(13, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(13, HIGH); // turn the LED on (HIGH is
the voltage level)
delay(1000); // wait for a second
digitalWrite(13, LOW); // turn the LED off by making
the voltage LOW
delay(1000); // wait for a second
}
Program:
23. Examples:
2. Fade LED
Program:
int led = 9; // the pin that the LED is attached to
int brightness = 0; // how bright the LED is
int fadeAmount = 5; // how many points to fade the LED by
void setup() {
pinMode(led, OUTPUT);
}
void loop() {
analogWrite(led, brightness);
brightness = brightness + fadeAmount;
// reverse the direction of the fading at the ends of the fade:
if (brightness == 0 || brightness == 255) {
fadeAmount = -fadeAmount ;
}
// wait for 30 milliseconds to see the dimming effect
delay(30);
}
24. Examples:
3. Blinking Rate LED
Program:
int sensorPin = A0; // select the input pin for the
potentiometer
int ledPin = 13; // select the pin for the LED
int sensorValue = 0; // variable to store the value coming
from the sensor
void setup() {
// declare the ledPin as an OUTPUT:
pinMode(ledPin, OUTPUT);
}
void loop() {
// read the value from the sensor:
sensorValue = analogRead(sensorPin);
// turn the ledPin on
digitalWrite(ledPin, HIGH);
// stop the program for <sensorValue> milliseconds:
delay(sensorValue);
// turn the ledPin off:
digitalWrite(ledPin, LOW);
// stop the program for for <sensorValue> milliseconds:
delay(sensorValue);
}
26. Examples:
5. Seven Segment Display
Program:
void setup()
{
pinMode(2,OUTPUT);pinMode(3,OUTPUT);
pinMode(4,OUTPUT);pinMode(5,OUTPUT);
pinMode(6,OUTPUT);pinMode(7,OUTPUT);
pinMode(8,OUTPUT);
}
void loop()
{
//Since it is a CA type 7-Segment display, a low input to a
pin triggers the LED ON
// Display “C” abbreviated for Computer
digitalWrite(2,0);digitalWrite(3,1);digitalWrite(4,1);
digitalWrite(5,0);digitalWrite(6,0);digitalWrite(7,0);
digitalWrite(8,1);delay(600);
// Display “S” abbreviated for Science
digitalWrite(2,0);digitalWrite(3,1);digitalWrite(4,0);
digitalWrite(5,0);digitalWrite(6,1);digitalWrite(7,0);
digitalWrite(8,0);
delay(600);
}
27. Examples:
6. Push Button
Program:
// constants won't change. They're used here to
// set pin numbers:
const int buttonPin = 2; // the number of the pushbutton pin
const int ledPin = 13; // the number of the LED pin
// variables will change:
int buttonState = 0; // variable for reading the pushbutton status
void setup() {
// initialize the LED pin as an output:
pinMode(ledPin, OUTPUT);
// initialize the pushbutton pin as an input:
pinMode(buttonPin, INPUT);
}
void loop() {
// read the state of the pushbutton value:
buttonState = digitalRead(buttonPin);
// check if the pushbutton is pressed.
// if it is, the buttonState is HIGH:
if (buttonState == HIGH) {
// turn LED on:
digitalWrite(ledPin, HIGH);
}
else {
// turn LED off:
digitalWrite(ledPin, LOW);
}
}
28. Examples:
7. LCD
Program:
// include the library code:
#include <LiquidCrystal.h>
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
// Print a message to the LCD.
lcd.print("hello, world!");
}
void loop() {
// set the cursor to column 0, line 1
// (note: line 1 is the second row, since counting begins with
0):
lcd.setCursor(0, 1);
// print the number of seconds since reset:
lcd.print(millis() / 1000);
}