Intel IoT Developer Kit Intel Edison Flash Firmware Manually
Getting started with Intel IoT Developer Kit
-
Upload
sulamita-garcia -
Category
Technology
-
view
2.059 -
download
7
description
Transcript of Getting started with Intel IoT Developer Kit
![Page 1: Getting started with Intel IoT Developer Kit](https://reader034.fdocuments.in/reader034/viewer/2022042508/5476dd18b4af9f39378b4631/html5/thumbnails/1.jpg)
Getting Started with Intel IoT Developer Kit – Dev kitSetup, Installing, Hello World and Sensors testing
Sulamita Garcia – Developer Evangelist - @sulagarcia
Munich, October 18 2014
![Page 2: Getting started with Intel IoT Developer Kit](https://reader034.fdocuments.in/reader034/viewer/2022042508/5476dd18b4af9f39378b4631/html5/thumbnails/2.jpg)
Agenda
• Devkit components: hardware and software
• Setting up Galileo/Edison
• Setting up developer environment
• Running sample codes
• Creating your application
• Dev kit library (MRAA) and sensors repository (UPM)
![Page 3: Getting started with Intel IoT Developer Kit](https://reader034.fdocuments.in/reader034/viewer/2022042508/5476dd18b4af9f39378b4631/html5/thumbnails/3.jpg)
Important – before starting
Intel Galileo Gen 1 -> 5V power supply
Intel Galileo Gen 2 -> 12V power supply
Intel Galileo Gen 1 + 12V power supply =
![Page 4: Getting started with Intel IoT Developer Kit](https://reader034.fdocuments.in/reader034/viewer/2022042508/5476dd18b4af9f39378b4631/html5/thumbnails/4.jpg)
Devkit components
![Page 5: Getting started with Intel IoT Developer Kit](https://reader034.fdocuments.in/reader034/viewer/2022042508/5476dd18b4af9f39378b4631/html5/thumbnails/5.jpg)
Dev kit components
Software
• Linux (Yocto) image to be used with micro SD card on Galileo; already installed on Edison
• IDEs for cross platform development
• MRAA and UPM libraries for abstracting complexity when using sensors and actuators
Hardware
• Intel Galileo Gen 2 or Edison
• Grove Starter Kit – Intel IoT Edition
• Micro SD
• Serial cable
• Ethernet cable
• Sensors and components
![Page 6: Getting started with Intel IoT Developer Kit](https://reader034.fdocuments.in/reader034/viewer/2022042508/5476dd18b4af9f39378b4631/html5/thumbnails/6.jpg)
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)
Ref.: http://maker.intel.com
![Page 7: Getting started with Intel IoT Developer Kit](https://reader034.fdocuments.in/reader034/viewer/2022042508/5476dd18b4af9f39378b4631/html5/thumbnails/7.jpg)
Intel® Edison module
• 22 nm Intel® SoC that includes a dual-core, dual-threaded Intel® Atom™ CPU at 500 MHz
• 32-bit Intel® Quark™ microcontroller at 100 MHz
• 1 GB LPDDR3 POP memory
• Flash storage 4 GB eMMC
• WiFi and Bluetooth® Low Energy
• 35.5 × 25.0 × 3.9 mm (1.4 × 1.0 × 0.15 inches)
• 40 GPIOs: UART, I2C, SPI, I2S, GPIO(PWM), USB, Sd cardRef.: http://maker.intel.com
![Page 8: Getting started with Intel IoT Developer Kit](https://reader034.fdocuments.in/reader034/viewer/2022042508/5476dd18b4af9f39378b4631/html5/thumbnails/8.jpg)
Intel® Edison - Arduino Expansion Board
Board I/O: Compatible with Arduino Uno (except only 4 PWM instead of 6 PWM) 20 digital input/output pins including 4 pins as PWM
outputs 6 analog inputs 1 UART (RX/TX) 1 I2C 1 ICSP 6-pin header (SPI) Micro USB device connector OR (via mechanical
switch) dedicated standard size USB host Type-A connector
Micro USB device (connected to UART) SD Card connector DC power jack (7V – 15V DC input)
Ref.: http://maker.intel.com
![Page 9: Getting started with Intel IoT Developer Kit](https://reader034.fdocuments.in/reader034/viewer/2022042508/5476dd18b4af9f39378b4631/html5/thumbnails/9.jpg)
Grove Starter Kit Plus - Intel® IoT EditionBase Shield
Buzzer
Button
Grove-LED
Sound Sensor
Rotary Angle Sensor
Touch Sensor
Smart Relay
Light Sensor
Temperature Sensor
Grove Cables
Mini Servo
9V to Barrel Jack Adapter - 126mm
DIP LED Blue-Blue
DIP LED Green-Green
DIP LED Red-Red
LCD RGB Backlight
![Page 10: Getting started with Intel IoT Developer Kit](https://reader034.fdocuments.in/reader034/viewer/2022042508/5476dd18b4af9f39378b4631/html5/thumbnails/10.jpg)
Extra sensors available depending on your project
SEN04031P Grove - Piezo Vibration Sensor
SEN01111P Grove - Air quality sensor
SEN11425P Grove - 125KHz RFID Reader
ACC90453O 4 pin grove adapter (5 per pack)
KIT80949P Wireless Sensor Node - Solar Kit
ROB08211P Grove Mini Servos
SEN04051P Grove - 3-Axis Digital Accelerometer
SEN11763P Grove - 3-Axis Digital Gyro
SEN12753P Grove - 3-Axis Digital Compass
COM22639P Grove - Relay
COM05231P Grove - Slide Potentiometer
![Page 11: Getting started with Intel IoT Developer Kit](https://reader034.fdocuments.in/reader034/viewer/2022042508/5476dd18b4af9f39378b4631/html5/thumbnails/11.jpg)
Important – before starting
• The next session can save you a lot of time and trouble – which will count tomorrow when you are trying to finish your project
• We will cover step by step how to get started
• Your options:
• C/C++ with Eclipse (recommended)
• JavaScript with XDK (recommended)
• Arduino (recommended)
• Visual programming with Wyliodrin – if you are new to programming
• Vi/terminal – if you are more comfortable with command line environment
![Page 12: Getting started with Intel IoT Developer Kit](https://reader034.fdocuments.in/reader034/viewer/2022042508/5476dd18b4af9f39378b4631/html5/thumbnails/12.jpg)
Online documentation for reference
This presentation: http://slidesha.re/1uuFgBH
https://software.intel.com/en-us/iot/getting-started
http://intel.com/edison/getstarted
![Page 13: Getting started with Intel IoT Developer Kit](https://reader034.fdocuments.in/reader034/viewer/2022042508/5476dd18b4af9f39378b4631/html5/thumbnails/13.jpg)
Setting up the Galileo board
![Page 14: Getting started with Intel IoT Developer Kit](https://reader034.fdocuments.in/reader034/viewer/2022042508/5476dd18b4af9f39378b4631/html5/thumbnails/14.jpg)
Setup the Galileo board
Distributed micro SD cards already prepared with latest image – just plug them in
Why do we need a micro SD and an image?
- Provide easy way to permanently store application on board
- Provides extra libraries and bindings
- Supports multiple programming languages
Note: For future updates, please refer to online documentation.Ref.: https://software.intel.com/en-us/iot-c-eclipse , Appendix
![Page 15: Getting started with Intel IoT Developer Kit](https://reader034.fdocuments.in/reader034/viewer/2022042508/5476dd18b4af9f39378b4631/html5/thumbnails/15.jpg)
Setup the Edison board
Distributed Edison already updated
If not, update software: https://communities.intel.com/docs/DOC-23192
![Page 16: Getting started with Intel IoT Developer Kit](https://reader034.fdocuments.in/reader034/viewer/2022042508/5476dd18b4af9f39378b4631/html5/thumbnails/16.jpg)
Setting up the developer environment
![Page 17: Getting started with Intel IoT Developer Kit](https://reader034.fdocuments.in/reader034/viewer/2022042508/5476dd18b4af9f39378b4631/html5/thumbnails/17.jpg)
Connect the SD card in your computer – copy the IDE file correspondent to your OS; for Windows, copy win-driver too
![Page 18: Getting started with Intel IoT Developer Kit](https://reader034.fdocuments.in/reader034/viewer/2022042508/5476dd18b4af9f39378b4631/html5/thumbnails/18.jpg)
Windows & Arduino – extract and install the contents of win-driver
![Page 19: Getting started with Intel IoT Developer Kit](https://reader034.fdocuments.in/reader034/viewer/2022042508/5476dd18b4af9f39378b4631/html5/thumbnails/19.jpg)
Now connect your environment
microUSB <-> USB
Ref.: https://communities.intel.com/docs/DOC-23147
![Page 20: Getting started with Intel IoT Developer Kit](https://reader034.fdocuments.in/reader034/viewer/2022042508/5476dd18b4af9f39378b4631/html5/thumbnails/20.jpg)
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
![Page 21: Getting started with Intel IoT Developer Kit](https://reader034.fdocuments.in/reader034/viewer/2022042508/5476dd18b4af9f39378b4631/html5/thumbnails/21.jpg)
USB-Serial on Gen2 – black wire means ground
![Page 22: Getting started with Intel IoT Developer Kit](https://reader034.fdocuments.in/reader034/viewer/2022042508/5476dd18b4af9f39378b4631/html5/thumbnails/22.jpg)
Connect board via serial – discover port on Windows
Ref.: https://software.intel.com/en-us/iot-c-eclipse
![Page 23: Getting started with Intel IoT Developer Kit](https://reader034.fdocuments.in/reader034/viewer/2022042508/5476dd18b4af9f39378b4631/html5/thumbnails/23.jpg)
Connect board via serial – discover port on MacOS
After connecting the serial cable, check if you have /dev/cu.usbserial(*)
If not, you may need to install a serial-USB FTDI driver.
Example:
Ref.: https://software.intel.com/en-us/iot-c-eclipse
![Page 24: Getting started with Intel IoT Developer Kit](https://reader034.fdocuments.in/reader034/viewer/2022042508/5476dd18b4af9f39378b4631/html5/thumbnails/24.jpg)
Connect via serial – putty, goSerial or minicom
User: root, no passwordRef.: https://software.intel.com/en-us/iot-c-eclipse
![Page 25: Getting started with Intel IoT Developer Kit](https://reader034.fdocuments.in/reader034/viewer/2022042508/5476dd18b4af9f39378b4631/html5/thumbnails/25.jpg)
Connecting Edison – configure_edison --setup
Configure password
Configure wifi
Galileo should automatically set up an IP address.
![Page 26: Getting started with Intel IoT Developer Kit](https://reader034.fdocuments.in/reader034/viewer/2022042508/5476dd18b4af9f39378b4631/html5/thumbnails/26.jpg)
Find your Galileo/Edison IP address and write it down: command `ip a`
Ping between board and your laptop to check connectivity
Ref.: https://software.intel.com/en-us/iot-c-eclipse
![Page 27: Getting started with Intel IoT Developer Kit](https://reader034.fdocuments.in/reader034/viewer/2022042508/5476dd18b4af9f39378b4631/html5/thumbnails/27.jpg)
Shortcut – if you feel comfortable with vi
If you have experience coding directly from the command line, you have:
• Busybox/vi
• Gcc
• Python
• Node.js
But we will continue with the IDEs, keep paying attention
Vim: https://github.com/IntelOpenDesign/MakerNode/tree/master/iotkd_libs
![Page 28: Getting started with Intel IoT Developer Kit](https://reader034.fdocuments.in/reader034/viewer/2022042508/5476dd18b4af9f39378b4631/html5/thumbnails/28.jpg)
Time to chose your path:
C/C++:
• Eclipse
Javascript:
• XDK
Arduino
• Arduino IDE for Galileo
Visual Programming (Blocky)
• Wyliodrin
![Page 29: Getting started with Intel IoT Developer Kit](https://reader034.fdocuments.in/reader034/viewer/2022042508/5476dd18b4af9f39378b4631/html5/thumbnails/29.jpg)
Arduino for Galileo/Edison
![Page 30: Getting started with Intel IoT Developer Kit](https://reader034.fdocuments.in/reader034/viewer/2022042508/5476dd18b4af9f39378b4631/html5/thumbnails/30.jpg)
Arduino for Galileo or Edison
https://communities.intel.com/docs/DOC-23242
![Page 31: Getting started with Intel IoT Developer Kit](https://reader034.fdocuments.in/reader034/viewer/2022042508/5476dd18b4af9f39378b4631/html5/thumbnails/31.jpg)
C/C++/Eclipse
![Page 32: Getting started with Intel IoT Developer Kit](https://reader034.fdocuments.in/reader034/viewer/2022042508/5476dd18b4af9f39378b4631/html5/thumbnails/32.jpg)
Eclipse(C/C++) – setting up
Copy to your computer
Extract the file you copied previously (iotdk-ide-${yourOS}.7z) with 7z Treats long paths better, needed for this file.
If you need to download: http://www.7-zip.org/
Note: Better to extract the file to C:\ on Windows
Execute devkit-launcher.bat
Ref.: https://software.intel.com/en-us/iot-c-eclipse
![Page 33: Getting started with Intel IoT Developer Kit](https://reader034.fdocuments.in/reader034/viewer/2022042508/5476dd18b4af9f39378b4631/html5/thumbnails/33.jpg)
Ref.: https://software.intel.com/en-us/iot-c-eclipse
![Page 34: Getting started with Intel IoT Developer Kit](https://reader034.fdocuments.in/reader034/viewer/2022042508/5476dd18b4af9f39378b4631/html5/thumbnails/34.jpg)
Click on Remote System Explorer
Ref.: https://software.intel.com/en-us/iot-c-eclipse
![Page 35: Getting started with Intel IoT Developer Kit](https://reader034.fdocuments.in/reader034/viewer/2022042508/5476dd18b4af9f39378b4631/html5/thumbnails/35.jpg)
Fill the IP address on (3)
Ref.: https://software.intel.com/en-us/iot-c-eclipse
![Page 36: Getting started with Intel IoT Developer Kit](https://reader034.fdocuments.in/reader034/viewer/2022042508/5476dd18b4af9f39378b4631/html5/thumbnails/36.jpg)
Running a sample - Click back on C/C++
Ref.: https://software.intel.com/en-us/node/519969
![Page 37: Getting started with Intel IoT Developer Kit](https://reader034.fdocuments.in/reader034/viewer/2022042508/5476dd18b4af9f39378b4631/html5/thumbnails/37.jpg)
Galileo - Right click 4_cpp_onboard_led
Ref.: https://software.intel.com/en-us/node/519969
![Page 38: Getting started with Intel IoT Developer Kit](https://reader034.fdocuments.in/reader034/viewer/2022042508/5476dd18b4af9f39378b4631/html5/thumbnails/38.jpg)
Click Run, select 4_cpp_onboard_led
Ref.: https://software.intel.com/en-us/node/519969
![Page 39: Getting started with Intel IoT Developer Kit](https://reader034.fdocuments.in/reader034/viewer/2022042508/5476dd18b4af9f39378b4631/html5/thumbnails/39.jpg)
JavaScript/Node.js/XDK
![Page 40: Getting started with Intel IoT Developer Kit](https://reader034.fdocuments.in/reader034/viewer/2022042508/5476dd18b4af9f39378b4631/html5/thumbnails/40.jpg)
Install the file copied from the SD card, XDK directory
Ref.: https://software.intel.com/en-us/html5/xdk-iot
![Page 41: Getting started with Intel IoT Developer Kit](https://reader034.fdocuments.in/reader034/viewer/2022042508/5476dd18b4af9f39378b4631/html5/thumbnails/41.jpg)
Login/create your account
![Page 42: Getting started with Intel IoT Developer Kit](https://reader034.fdocuments.in/reader034/viewer/2022042508/5476dd18b4af9f39378b4631/html5/thumbnails/42.jpg)
Start with a Sample (under IoT Projects) – click on “Use this Template”
![Page 43: Getting started with Intel IoT Developer Kit](https://reader034.fdocuments.in/reader034/viewer/2022042508/5476dd18b4af9f39378b4631/html5/thumbnails/43.jpg)
Should look like this
![Page 44: Getting started with Intel IoT Developer Kit](https://reader034.fdocuments.in/reader034/viewer/2022042508/5476dd18b4af9f39378b4631/html5/thumbnails/44.jpg)
Select Galileo/Edison board
![Page 45: Getting started with Intel IoT Developer Kit](https://reader034.fdocuments.in/reader034/viewer/2022042508/5476dd18b4af9f39378b4631/html5/thumbnails/45.jpg)
Toggle the console
![Page 46: Getting started with Intel IoT Developer Kit](https://reader034.fdocuments.in/reader034/viewer/2022042508/5476dd18b4af9f39378b4631/html5/thumbnails/46.jpg)
Click Manage your daemon/IoT device menu in the bottom taskbar. Select sync PC time w/ clock on target board to avoid computer and device timing issues.
![Page 47: Getting started with Intel IoT Developer Kit](https://reader034.fdocuments.in/reader034/viewer/2022042508/5476dd18b4af9f39378b4631/html5/thumbnails/47.jpg)
Click Install/Build to fetch node modules specified in package.json and install them on device; 1st time click Build
![Page 48: Getting started with Intel IoT Developer Kit](https://reader034.fdocuments.in/reader034/viewer/2022042508/5476dd18b4af9f39378b4631/html5/thumbnails/48.jpg)
Click Upload to upload the current project to the Galileo board
![Page 49: Getting started with Intel IoT Developer Kit](https://reader034.fdocuments.in/reader034/viewer/2022042508/5476dd18b4af9f39378b4631/html5/thumbnails/49.jpg)
Click Run to run the project on the device. The LED should be blinking.
![Page 50: Getting started with Intel IoT Developer Kit](https://reader034.fdocuments.in/reader034/viewer/2022042508/5476dd18b4af9f39378b4631/html5/thumbnails/50.jpg)
Devkit library (MRAA) and sensor repository (UPM)
![Page 51: Getting started with Intel IoT Developer Kit](https://reader034.fdocuments.in/reader034/viewer/2022042508/5476dd18b4af9f39378b4631/html5/thumbnails/51.jpg)
MRAA lib - https://github.com/intel-iot-devkit/mraaMRAA – random letters, doesn’t mean anything
API documentation available - http://iotdk.intel.com/docs/master/mraa/
Examples directory
Minimum code sample:
mraa_gpio_context gpio;
gpio = mraa_gpio_init(6);
mraa_gpio_dir(gpio, MRAA_GPIO_IN);
for (;;) {
fprintf(stdout, "Gpio is %d\n", mraa_gpio_read(gpio));
sleep(1);
}
mraa_gpio_close(gpio);
![Page 52: Getting started with Intel IoT Developer Kit](https://reader034.fdocuments.in/reader034/viewer/2022042508/5476dd18b4af9f39378b4631/html5/thumbnails/52.jpg)
UPM repository - https://github.com/intel-iot-devkit/upm
List of supported sensors in C++
API documentation - http://iotdk.intel.com/docs/master/upm/
Examples directory
Minimum code example:
upm::GroveTemp* s = new upm::GroveTemp(0);
std::cout << s->name() << std::endl;
for (int i=0; i < 10; i++) {
std::cout << s->value() << std::endl;
sleep(1);
}
![Page 53: Getting started with Intel IoT Developer Kit](https://reader034.fdocuments.in/reader034/viewer/2022042508/5476dd18b4af9f39378b4631/html5/thumbnails/53.jpg)
Just remember to use the correspondent library
Project name (right click) -> Settings -> C/C++ Build -> Settings -> Tool Settings -> Cross G++ Linker -> Miscelaneous
![Page 54: Getting started with Intel IoT Developer Kit](https://reader034.fdocuments.in/reader034/viewer/2022042508/5476dd18b4af9f39378b4631/html5/thumbnails/54.jpg)
UPM API documentation – which library to use?
![Page 55: Getting started with Intel IoT Developer Kit](https://reader034.fdocuments.in/reader034/viewer/2022042508/5476dd18b4af9f39378b4631/html5/thumbnails/55.jpg)
Creating new app
![Page 56: Getting started with Intel IoT Developer Kit](https://reader034.fdocuments.in/reader034/viewer/2022042508/5476dd18b4af9f39378b4631/html5/thumbnails/56.jpg)
If using Eclipse
![Page 57: Getting started with Intel IoT Developer Kit](https://reader034.fdocuments.in/reader034/viewer/2022042508/5476dd18b4af9f39378b4631/html5/thumbnails/57.jpg)
Create your first app – copy&paste an existing sample
![Page 58: Getting started with Intel IoT Developer Kit](https://reader034.fdocuments.in/reader034/viewer/2022042508/5476dd18b4af9f39378b4631/html5/thumbnails/58.jpg)
Creating your first app – if you use UPM repository
Project name (right click) -> Settings -> C/C++ Build -> Settings -> Tool Settings -> Cross G++ Linker -> Miscelaneous
![Page 59: Getting started with Intel IoT Developer Kit](https://reader034.fdocuments.in/reader034/viewer/2022042508/5476dd18b4af9f39378b4631/html5/thumbnails/59.jpg)
If using XDK
![Page 60: Getting started with Intel IoT Developer Kit](https://reader034.fdocuments.in/reader034/viewer/2022042508/5476dd18b4af9f39378b4631/html5/thumbnails/60.jpg)
Node.js
Find the library name – example: libupm-grove
-> replace “lib” for “js” and you have it: jsupm_grove
Code:
require(“jsupm_grove”);
![Page 61: Getting started with Intel IoT Developer Kit](https://reader034.fdocuments.in/reader034/viewer/2022042508/5476dd18b4af9f39378b4631/html5/thumbnails/61.jpg)
If using Python
![Page 62: Getting started with Intel IoT Developer Kit](https://reader034.fdocuments.in/reader034/viewer/2022042508/5476dd18b4af9f39378b4631/html5/thumbnails/62.jpg)
Python
Find the library name – example: libupm-grove
-> replace “lib” for “py” and you have it: pyupm-grove
Code:
import pyupm_grove
![Page 63: Getting started with Intel IoT Developer Kit](https://reader034.fdocuments.in/reader034/viewer/2022042508/5476dd18b4af9f39378b4631/html5/thumbnails/63.jpg)
If using Arduino
![Page 64: Getting started with Intel IoT Developer Kit](https://reader034.fdocuments.in/reader034/viewer/2022042508/5476dd18b4af9f39378b4631/html5/thumbnails/64.jpg)
Go to IDZ IoT page, find your sensor
![Page 65: Getting started with Intel IoT Developer Kit](https://reader034.fdocuments.in/reader034/viewer/2022042508/5476dd18b4af9f39378b4631/html5/thumbnails/65.jpg)
Under References, follow Grove Wiki
![Page 66: Getting started with Intel IoT Developer Kit](https://reader034.fdocuments.in/reader034/viewer/2022042508/5476dd18b4af9f39378b4631/html5/thumbnails/66.jpg)
Recap – navigating IDZ IoT - https://software.intel.com/iot
![Page 67: Getting started with Intel IoT Developer Kit](https://reader034.fdocuments.in/reader034/viewer/2022042508/5476dd18b4af9f39378b4631/html5/thumbnails/67.jpg)
Now, who has problems???