Getting started with Intel IoT Developer Kit

  • Published on
    27-Nov-2014

  • View
    2.019

  • Download
    4

Embed Size (px)

DESCRIPTION

Learn what is, how to set up and create applications with the Intel IoT Developer Kit.

Transcript

  • 1. Getting Started with Intel IoT Developer Kit DevkitSetup, Installing, Hello World and Sensors testingSulamita Garcia Developer Evangelist - @sulagarciaMunich, October 18 2014

2. 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) 3. Important before startingIntel Galileo Gen 1 -> 5V power supplyIntel Galileo Gen 2 -> 12V power supplyIntel Galileo Gen 1 + 12V power supply = 4. Devkit components 5. Dev kit componentsSoftware Linux (Yocto) image to be used withmicro SD card on Galileo; alreadyinstalled on Edison IDEs for cross platform development MRAA and UPM libraries for abstractingcomplexity when using sensors andactuatorsHardware Intel Galileo Gen 2 or Edison Grove Starter Kit Intel IoT Edition Micro SD Serial cable Ethernet cable Sensors and components 6. Intel Galileo Development Board Gen 2Board 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 7. 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 8. Intel Edison - Arduino Expansion BoardBoard I/O: Compatible with Arduino Uno (except only4 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 9. Grove Starter Kit Plus - Intel IoT EditionBase ShieldBuzzerButtonGrove-LEDSound SensorRotary Angle SensorTouch SensorSmart RelayLight SensorTemperature SensorGrove CablesMini Servo9V to Barrel Jack Adapter - 126mmDIP LED Blue-BlueDIP LED Green-GreenDIP LED Red-RedLCD RGB Backlight 10. Extra sensors available depending on your projectSEN04031P Grove - Piezo Vibration SensorSEN01111P Grove - Air quality sensorSEN11425P Grove - 125KHz RFID ReaderACC90453O 4 pin grove adapter (5 per pack)KIT80949P Wireless Sensor Node - Solar KitROB08211P Grove Mini ServosSEN04051P Grove - 3-Axis Digital AccelerometerSEN11763P Grove - 3-Axis Digital GyroSEN12753P Grove - 3-Axis Digital CompassCOM22639P Grove - RelayCOM05231P Grove - Slide Potentiometer 11. Important before starting The next session can save you a lot of time and trouble which will count tomorrowwhen 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 12. Online documentation for referenceThis presentation: http://slidesha.re/1uuFgBHhttps://software.intel.com/en-us/iot/getting-startedhttp://intel.com/edison/getstarted 13. Setting up the Galileo board 14. Setup the Galileo boardDistributed micro SD cards already prepared with latest image just plug them inWhy 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 languagesNote: For future updates, please refer to online documentation.Ref.: https://software.intel.com/en-us/iot-c-eclipse , Appendix 15. Setup the Edison boardDistributed Edison already updatedIf not, update software: https://communities.intel.com/docs/DOC-23192 16. Setting up the developer environment 17. Connect the SD card in your computer copy the IDEfile correspondent to your OS; for Windows, copy win-drivertoo 18. Windows & Arduino extract and install the contents of win-driver 19. Now connect your environmentmicroUSB USBRef.: https://communities.intel.com/docs/DOC-23147 20. Now connect your environmentUSB Serial cableEthernetPowerSD CardSerial3124Ref.: https://software.intel.com/en-us/iot-c-eclipse 21. USB-Serial on Gen2 black wire means ground 22. Connect board via serial discover port on WindowsRef.: https://software.intel.com/en-us/iot-c-eclipse 23. Connect board via serial discover port on MacOSAfter 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 24. Connect via serial putty, goSerial or minicomUser: root, no passwordRef.: https://software.intel.com/en-us/iot-c-eclipse 25. Connecting Edison configure_edison --setupConfigure passwordConfigure wifiGalileo should automatically set up an IP address. 26. Find your Galileo/Edison IP address and write it down:command `ip a`Ping between board and your laptop tocheck connectivityRef.: https://software.intel.com/en-us/iot-c-eclipse 27. Shortcut if you feel comfortable with viIf you have experience coding directly from the command line, you have: Busybox/vi Gcc Python Node.jsBut we will continue with the IDEs, keep paying attention Vim: https://github.com/IntelOpenDesign/MakerNode/tree/master/iotkd_libs 28. Time to chose your path:C/C++: EclipseJavascript: XDKArduino Arduino IDE for GalileoVisual Programming (Blocky) Wyliodrin 29. Arduino for Galileo/Edison 30. Arduino for Galileo or Edisonhttps://communities.intel.com/docs/DOC-23242 31. C/C++/Eclipse 32. Eclipse(C/C++) setting upCopy to your computerExtract 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 WindowsExecute devkit-launcher.batRef.: https://software.intel.com/en-us/iot-c-eclipse 33. Ref.: https://software.intel.com/en-us/iot-c-eclipse 34. Click on Remote System ExplorerRef.: https://software.intel.com/en-us/iot-c-eclipse 35. Fill the IP address on (3)Ref.: https://software.intel.com/en-us/iot-c-eclipse 36. Running a sample - Click back on C/C++Ref.: https://software.intel.com/en-us/node/519969 37. Galileo - Right click 4_cpp_onboard_ledRef.: https://software.intel.com/en-us/node/519969 38. Click Run, select 4_cpp_onboard_ledRef.: https://software.intel.com/en-us/node/519969 39. JavaScript/Node.js/XDK 40. Install the file copied from the SD card, XDK directoryRef.: https://software.intel.com/en-us/html5/xdk-iot 41. Login/create your account 42. Start with a Sample (under IoT Projects) click on Use thisTemplate 43. Should look like this 44. Select Galileo/Edison board 45. Toggle the console 46. Click Manage your daemon/IoT device menu in the bottomtaskbar. Select sync PC time w/ clock on target board toavoid computer and device timing issues. 47. Click Install/Build to fetch node modules specified inpackage.json and install them on device; 1st time click Build 48. Click Upload to upload the current project to the Galileoboard 49. Click Run to run the project on the device. The LED shouldbe blinking. 50. Devkit library (MRAA) and sensor repository (UPM) 51. MRAA lib - https://github.com/intel-iot-devkit/mraaMRAA random letters, doesnt mean anythingAPI documentation available - http://iotdk.intel.com/docs/master/mraa/Examples directoryMinimum code sample:mraa_gpio_context gpio;gpio = mraa_gpio_init(6);mraa_gpio_dir(gpio, MRAA_GPIO_IN);for (;;) {fprintf(stdout, "Gpio is %dn", mraa_gpio_read(gpio));sleep(1);}mraa_gpio_close(gpio); 52. UPM repository - https://github.com/intel-iot-devkit/upmList of supported sensors in C++API documentation - http://iotdk.intel.com/docs/master/upm/Examples directoryMinimum code example:upm::GroveTemp* s = new upm::GroveTemp(0);std::cout name() C/C++Build -> Settings -> ToolSettings -> Cross G++Linker -> Miscelaneous 54. UPM API documentation which library to use? 55. Creating new app 56. If using Eclipse 57. Create your first app copy&paste an existing sample 58. Creating your first app if you use UPM repositoryProject name (right click)-> Settings -> C/C++Build -> Settings -> ToolSettings -> Cross G++Linker -> Miscelaneous 59. If using XDK 60. Node.jsFind the library name example: libupm-grove-> replace lib for js and you have it: jsupm_groveCode:require(jsupm_grove); 61. If using Python 62. PythonFind the library name example: libupm-grove-> replace lib for py and you have it: pyupm-groveCode:import pyupm_grove 63. If using Arduino 64. Go to IDZ IoT page, find your sensor 65. Under References, follow Grove Wiki 66. Recap navigating IDZ IoT - https://software.intel.com/iot 67. Now, who has problems???

Recommended

View more >