What Will You Make? Intel® Edison - Create wearables and other products for the Internet of Things Intel Facts • Global headquarters: Santa Clara, California • 100,000+ employees worldwide • 55 percent of employees reside in the U.S. Intel’s vision: This decade we will create and extend computing technology to connect and enrich the life of every person on earth 1 WHAT WILL YOU MAKE? Intel® Edison Block Diagram Intel Confidential 2 WHAT WILL YOU MAKE? What is Arduino? An open-source hardware and software platform for building electronics projects 3 • A physical programmable circuit board (often referred to as a microcontroller) • A piece of software, or IDE (Integrated Development Environment) that runs on your computer, used to write and upload computer code to the physical board (supports Mac/Windows/Linux) WHAT WILL YOU MAKE? Intel® Edison Board for Arduino 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) Other names and brands may be claimed by the property of others by all third party name and the notation. Intel Confidential 4 WHAT WILL YOU MAKE? Arduino Sketch, Linux, WiFi & BT Intel® Edison Arduino Expansion Board Block Diagram 5 WHAT WILL YOU MAKE? Arduino Shields There are hundreds of shields available from dozens of suppliers GSM/Wifi/Bluetooth Battery/Solar RFID/Xbee/NFC Midi/WAV/MP3 Ethernet/GPS shieldlist.org adafruit.com cooking-hacks.com sparkfun.com store.arduino.cc cutidigi.com etc Sensors/LCDs 6 RS232/RS485 SD/EEPROM Camera/Video/Home Robotics/Fun/Actuators WHAT WILL YOU MAKE? Edison Developer Options Arduino* Developer Java script Developer Cloud IDE Programming Language Tools/ Libraries OS / Boot Image Embedded Developer Visual Programming MCU Developer IoT Kit & Mashery* Arduino* IDE Win */ Mac* Intel XDK Win*/ Mac*/ Linux* Eclipse Win*/ Mac* / Linux* Wyliodrin* Web Win*/ Mac* / Linux* Arduino* Sketch C++ Javascript (Node JS) C/ C++/Python Visual Javascript C/C++ Arduino* Libraries Intel XDK ISS Wyliodrin* MCU SDK Yocto Linux* 1.6 * Windows is a registered trademark of Microsoft Corporation in the United States and other countries. Other names and brands may be claimed by the property of others by all third party name and the notation. 7 WHAT WILL YOU MAKE? RTOS Arduino Software overview 8 8 WHAT WILL YOU MAKE? Arduino Software Compatibility Familiar Arduino IDE with example sketches Edison Load Sketch from PC to Edison 9 WHAT WILL YOU MAKE? Sketch Overview Comment Block Comment Global Variable Code executed once on initial load Code Loop ran continuously 10 WHAT WILL YOU MAKE? Intel® XDK – IoT Edition https://software.intel.com/en-us/html5/xdk-iot 11 WHAT WILL YOU MAKE? Node Red http://nodered.org/ 12 WHAT WILL YOU MAKE? Wyliodrin https://www.wyliodrin.com/ https://projects.wyliodrin.com/wiki/boards_setup/arduinogalileo 13 WHAT WILL YOU MAKE? Let’s see how it works……. 14 WHAT WILL YOU MAKE? Adding a Sensor #define A_PIN 0 #define D_PIN 6 //analog pin for LDR //digital pin for LED int value; void setup() { pinMode(D_PIN, OUTPUT); } void loop() { value = map(analogRead(A_PIN), 0, 1023, 0, 255); analogWrite(D_PIN, value); } Light Distance Temperature Acceleration Vibration Motion Touch Gas Sound Etc…. Great breadboarding tool – fritzing http://fritzing.org/home/ 15 WHAT WILL YOU MAKE? How does this get communicated ??? Using Edison’s WiFi capability IBM Bluemix Cloud service – http://datafest.mybluemix.net/?cm_mmc=IBMEcoDNA-_-IICSVL-_-outbound-_-Datafest2015 https://console.ng.bluemix.net/home Portal uses MQTT Broker to communicate to devices - http://mqtt.com/ Note :- Arduino native MQTT library needs to be modified to work on Edison & Galileo – we have the library here For testing purposes, there is a test portal to validate that data is being sent. https://quickstart.internetofthings.ibmcloud.com/#/ 16 WHAT WILL YOU MAKE? Let’s look at a simple MQTT Test Setup Temperature Sensor input to A0 of Galileo Sample Arduino Sketch provided – EdisonTemp.ino Notes :1. Setup WiFi connection 1. All you need is SSID & Passphrase 2. Configure MQTT Session 1. Client Name format 1. 17 d:quickstart:<name>:mac 2. Max length 34 characters 3. WiFi MAC address used as a unique Identifier - found inside Edison Box 4. MAC address is case sensitive – consistent cut & paste needed WHAT WILL YOU MAKE? Where do I find everything ?? 18 18 WHAT WILL YOU MAKE? WITI Hackathon – IBM Site Videos guiding you through the topics covered in today’s Webinar 19 WHAT WILL YOU MAKE? Getting Started Files – IBM Site Video Links to other Edison Training Material Powerpoint tutorials for getting started with Arduino IDE MQTT Arduino Library for Edison & Galileo Example MQTT Arduino Sketch to IBM Quickstart https://www.ibm.com/developerworks/community/groups/service/html/communityview?communityUuid=062ec653-df20-41f8-aef8be4566dfe442#fullpageWidgetId=Wd63664788fd0_4928_98be_429ec526a3b4 20 WHAT WILL YOU MAKE? Support From Intel – Where to Go • The IBM WITI Page is your one-stop-shop for support • Intel will monitor the forum pages & provide any assistance required during the Hackathon event. • Intel have a wide spread across Geos who will monitor the forum • Target response time is 24hr • Intel will continue to post further useful documents & guides to the IBM pages over the coming days & weeks. 21 WHAT WILL YOU MAKE? Controlling The I/O Digital Input / Output • These are used to control single digital singles & can be set to either output a signal or receive a signal. • Uses – reading input signals like switches, controlling outputs LEDs, Motors, Relays Analogue Digital Converter • 12 bit accuracy, 6 channels available through Arduino pins • ADC sampling at 5kHz- take a ‘snapshot’ of the voltage level every 200uS PWM – Pseudo Analogue Outputs 23 • PWM stands for Pulse Width Modulation • Used to get analogue results by digital means • Sends pulses of power to simulate voltage • The duration of high power is know as the ‘Pulse Width ’ WHAT WILL YOU MAKE? Controlling the I/O UART • UART stands for Universal Asynchronous Receiver/Transmitter (UART) • It is a piece of computer hardware that translates data between parallel and serial forms. • The universal designation indicates that the data format and transmission speeds are configurable. • It takes bytes of data and transmits the individual bits in a sequential fashion. • At the destination, a second UART re-assembles the bits into complete bytes. • Second UART available Arduino pins I2C 24 • I²C stands for Inter-Integrated Circuit • It is a bus used for attaching low-speed peripherals to computer motherboards and embedded systems. • See http://en.wikipedia.org/wiki/I%C2%B2C for more information. • Low speed data communication • Collecting data from sensors and other devices. • Available through Arduino pins WHAT WILL YOU MAKE?