Post on 14-Aug-2015
Introduction to Intel IoT
Hardware, Software, Connectivity, and Innovation using Intel Galileo
INNOVASEANSoutheast Asia Makerspace Summit
5-7 June 2015Singapore
Name : Sofian Hadiwijaya SocMed : @sofianhw Email : sofian@crazyhackerz.com
Introduction
Introduction ▪ Founder of Crazy Hackerz ▪ Intel IoT Innovator
▪ Web developer ▪ Javascript, Nodejs, Python
▪ The Winner of Blackberry Jam Hack Asia in Bangkok 2012
Introduction
Introduction
Introduction
Intel Galileo Board Overview
7
Intel Galileo Board Overview
8
Intel Galileo Board Overview
9
▪ The Intel® Galileo board is based on the Intel® Quark SoC X1000, a 32-‐ bit Intel Pentium®-‐class 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.
▪ The Galileo board is also software-‐compatible with the Arduino Software Development Environment.
▪ The Intel processor and surrounding native I/O capabilities of the SoC provides for a fully featured offering for both the maker community and students alike
Intel Galileo Board Communication
10
▪ 10/100 Mb Ethernet RJ45 port ▪ USB device port. ▪ USB Host port. ▪ Mini PCI Express (mPCIe)
Internet of Things Overview
11
Internet of Things Overview
12
Internet of Things Overview
13
Internet of Things Overview
14
Internet of Things Component
15
▪ Things ▪ Internet ▪ People / Process
Internet of Things Device
16
▪ Sensors / Actuators ▪ Microcontroller ▪ Minicomputer
Internet of Things Connectivity
17
▪ Data Protocol ▪ HTTP ▪ MQTT ▪ CoAP
▪ Network ▪ WiFi ▪ LAN ▪ Bluetooth ▪ BLE ▪ 6lowpan
Intel Galileo Board Arduino
18
▪ There are two location where you can download the Arduino IDE for Intel Galileo: ▪ The Arduino website http://arduino.cc/en/main/software. ▪ The Intel website https://downloadcenter.intel.com/
download/24782
Intel Galileo Board Connecting
19
▪ Always connect the power supply before the USB cable on client port, to avoid hardware damages. Remember, the intel Galileo Gen 2 power supply must be between 7V and 12V DC. You cannot use 5V DC.
▪ Always keep the power supply connected to Intel Galileo when transferring sketches or updating the firmware of your board. Developers are tempted to use the USB Client Port because if can boot the board and run the sketches but the 5V power supply is really recommended to keep connected in all occasions and to avoid hardware instability.
Intel Galileo Board Connecting
20
Intel Galileo Board Installing Aduino IDE
21
▪ For the windows user, just simple extract the file, and double click Arduino.exe
▪ And for the MacOs user, also extract the file and move it into Application folder.
▪ For The Linux User: ▪ Extract download file ▪ some of linux distribution include a package call “modem
manager” that can affect the serial port communication. you should remove it.
▪ after that just run “./arduino”
Intel Galileo Board Understanding Arduino IDE
22
Intel Galileo Board Understanding Arduino IDE
23
1. Area code where you develop the code. 2. Notification bar informing you if the code was saved and
whether the compilation was successful. 3. Console message with details of compilation, file transfer
messages, and error messages. 4. Informs the line number of the cursor in the editor. 5. Verify icon: compile the code. 6. Transfer icon: compule the code and transfer to Intel Galileo. 7. Open a new sketch. 8. Open a sketch. 9. Save the edited sketch. 10.Open the serial debug console.
Intel Galileo Board Understanding Arduino IDE
24
Intel Galileo Board Understanding Arduino IDE
25
Intel Galileo Board Understanding Arduino IDE
26
• Note that the port name varies according to operational system : • Windows: the ports are named with the COM prefix, followed an integer number, such as COM5.
• Linux: the ports are named with the ttyACM prefix, followed by an integer number, such as ttyACM0.
• MacOs: the ports are named with the /dev/cu.usbmodem prefix, followed by a sequence of numbers and/or alphabetic characters, such as /dev/cu.usbmodem0001 or /dev/cu.usbmodemfd021
Intel Galileo Board What Is a Sketch?
27
The sketch is composed by two main function: setup() and loop() • the setup() function is executed one time, and this function establishes the initial setup of your hardware, including the pin directions, etc.
• the loop() function is cyclic, which means it works like an infinite loop. It is on this function you control your hardware.
Intel Galileo Board Arduino Reference
28
• Digital I/O • pinMode(int pin, int mode) • digitalWrite(int pin, int state) • digitalRead(int pin)
• Analog I/O • analogRead(int pin) • analogWrite(int pin, int value)
• Time • delay(int milliseconds)
http://arduino.cc/en/Reference/Homepage
Intel Galileo Board Hello world!!
29
• File -‐> Example -‐> Basic -‐> Blink • Upload to Galileo
Intel Galileo Board Hello world!!
30
• system("ifconfig eth0 192.168.2.3 netmask 255.255.255.0 gateway 192.168.2.1");
• system("telnetd -‐l /bin/sh”);
• system("ifconfig eth0 > /dev/ttyGS0”); • sleep(10);
Intel Galileo Board GPIO Ref
31
Intel Galileo Board Control GPIO Linux
32
• Setting IO13 as GPIO Output : $ echo -‐n “out” > /sys/class/gpio/gpio39/direction $ echo 0 > /sys/class/gpio/gpio39/value # LOW $ echo 1 > /sys/class/gpio/gpio39/value # HIGH