CONNECT TO THE CLOUD IOT Course Vijay Janapa Reddi Intel (UT Austin)

Slides:



Advertisements
Similar presentations
ARDUINO FRAMEWORK.
Advertisements

Intermediate Electronics and Lilypad Where Electronics Meet Textiles Workshop with Lynne Bruning and Troy Robert Nachtigall Sponsored by Spark Fun and.
Servo Background Servos provide control of rotary position Servos are used extensively in the remote control hobby world for: Aircraft (flaps, ailerons,
Anurag Dwivedi & Rudra Pratap Suman.  Open Source electronic prototyping platform based on flexible easy to use hardware and software.
What is Arduino?  Arduino is a ATMEL 168 micro-controller kit designed specially for small projects  User friendly IDE(Integrated Development Environment)
Embedded Sumo 1T4 – 1T5 UTRA.
Passwords suck Nico Smit November “The million passwords dilemma:”  Just like having a million keys suck, so also having a million usernames and.
The Internet of Things is Open for Business. Chad Jones Vice President, Product
Intro to Programming and Microcontrollers. Activity Group into pairs and sit back-to-back. Pick one person who is going to draw. The other person will.
Lesson 4: Breathing Monitors. Breathing Monitors In the past 3 classes, we’ve learned – How to write to a digital pin – How to read the value of a digital.
PROJECT : MAINTENANCE AND INSTRUMENTATION OF A RENEWABLE ENERGY PLATFORM BIMANTARA ADI WITHAKA TUTOR : MATTHIEU PUIGT GIM DEPARTMENT IUT LITTORAL COTE.
Embedded Programming and Robotics Lesson 2 C Programming Refresher C Programming1.
Introduction to Arduino Prepared by R. Lamond.  “Arduino is an open-source electronics prototyping platform based on flexible, easy- to-use hardware.
Colorado Space Grant Consortium Gateway To Space ASEN 1400 / ASTR 2500 Class #12 Gateway To Space ASEN 1400 / ASTR 2500 Class #12 T-58.
Basic Circuits – Lab 2 Arduino and Sensors
Adrian Crenshaw.  I run Irongeek.com  I have an interest in InfoSec education  I don’t know everything - I’m.
DPNM Lab., POSTECH 1/25 CS490K - Internet of Things (IoT) Jonghwan Hyun DPNM Lab. Department of Computer Science and Engineering, POSTECH
Home controlling system based on Galileo Final Semester Presentation Started at: Winter 2015 Project supervised by: Mony Orbach Project performed by: Khalid.
1Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Sensor Network Data Collection and Storage Chuck Bell, Sr. Software Developer, MySQL.
Simple Web Services. Internet Basics The Internet is based on a communication protocol named TCP (Transmission Control Protocol) TCP allows programs running.
Simple Web Services. Internet Basics The Internet is based on a communication protocol named TCP (Transmission Control Protocol) TCP allows programs running.
Tools for Web Applications. Overview of TCP/IP Link Layer Network Layer Transport Layer Application Layer.
ProtoSnap Introduction to Arduino Casey Haskell, Pete Lewis, David Stillman, Jim Lindblom, Pete Dokter, Lindsay Levkoff, Trevor Zylstra.
Arduino. What is it? A open-source software suite and single-board microcontroller. Allows easy and affordable prototyping of microcontroller applications.
Introduction to the Arduino
Alex Layton, Purdue University
Programming, Serial and Virtual Prototyping. Code if ( You like semicolons ) { Stay here for intro to Arduino code } else { Join the MODKit group for.
FriendFinder Location-aware social networking on mobile phones.
ARDUINO 1. Basics  Comments  /* * Blink * * The basic Arduino example. Turns on an LED on for one second, * then off for one second, and so on... We.
1 - Remove LED from 13 and GND - Bring out your breadboard from HW#4 Arduino Overview:
Basic Circuits – Lab 4 Serial and OSC (maybe some theory too) Xmedia Spring 2011.
The ERA of API in the World of IoT Jing Zhang-Lee November, 2015.
Microcontrollers, Microcomputers, and Microprocessors
Photoresistor resistance changes dramatically with light level living with the lab Using Photoresistors with an Arduino © 2011 LWTL faculty team.
Youn-Hee Han, In-Seok Kang {yhhan, Laboratory of Intelligent Networks Advanced Technology Research Center Korea University of Technology.
FTP Client API FTP in embedded devices Implementing an FTP Client FTP Command APIs Other FTP Client APIs.
INTERNET OF EVERYTHING SDU 2016 Week 6. Getting Input from Sensors  Sensors give report on the world around it  Sensors convert physical input an electrical.
COMP2322 Lab 4 Socket Programming Toby Lam March 2, 2016.
Simple Web Services. Internet Basics The Internet is based on a communication protocol named TCP (Transmission Control Protocol) TCP allows programs running.
Microcontroller basics Embedded systems for mortals.
ME 120: User-defined functions: average analog input reading Arduino Programming – Part 5: User-defined functions ME 120 Mechanical and Materials Engineering.
Microcontroller basics Embedded systems for mortals.
ME 120: Arduino Programming Arduino Programming Part II ME 120 Mechanical and Materials Engineering Portland State University
Programming in Arduino Materials:Arduino Board Casperelectronics Pre Pres. Notes Photos from workshop?
INTERNET OF EVERYTHING SDU 2016 Week 12. Remotely Controlling Devices  interact with almost any device that uses some form of remote control  TVs, audio.
Arduino + Bluetooth TYWu. Connection Arduino + Bluetooth Module.
I I R R T T Internet Real Time Lab SECE SYSTEM SECE SERVER INTERNET ELECTRICAL APPLIANCES CONNECTED TO MICROCONTROLLER … … : register & download.
Microcontroller basics
Electronic instrumentation Digitization of Analog Signal in TD
Pulse-Width Modulation: Simulating variable DC output
Pulse Width Modulation Instructor Dr Matthew Khi Yi Kyaw.
Hacking on Arduino George Patterson
Having fun with code, using Arduino in a middle school CS classroom

Manual for Arduino Kit v1.0
z/Ware 2.0 Technical Overview
Microcontroller basics
System Design of Internet-of-Things for Residential Smart Grid
Get Your Project Started with Arduino
Lab 1: Arduino Basics Topics: Arduino Fundamentals, First Circuit
Arduino Uno and sensors
Roller Coaster Design Project
IoT Programming the Particle Photon.
Programming, Serial and Virtual Prototyping
Putting the I in IoT.
Programming 2: The Arduino IDE & First Sketches
Communication Protocols
Arduino程式範例.
Pulse-Width Modulation: Simulating variable DC output
Arduino Programming: “if” statements
Presentation transcript:

CONNECT TO THE CLOUD IOT Course Vijay Janapa Reddi Intel (UT Austin)

Goals Review Networking Communication Cloud Data sharing 2

Connect to the Cloud! 3

4

Xively Cloud Services Supports hundreds of platforms, millions of gateways and a crazy number of smart devices Comprehensive and secure infrastructure services Online development tools and dev center 5

6

Xively Feed ID Channels API Keys Triggers 7

Connect an Arduino to Xively 8

Hooking up a Photocell 9

... // assume global variables here and setup() for Ethernet (as we saw earlier) void loop() {... // if you're not connected, and ten seconds have passed since // your last connection, then connect again and send data: if(!client.connected() && (millis() - lastConnectionTime > postingInterval)) { sendData(sensorReading); }...

// this method makes a HTTP connection to the server: void sendData(int thisData) { // if there's a successful connection: if (client.connect(server, 80)) { Serial.println("connecting..."); // send the HTTP PUT request: client.print("PUT /v2/feeds/"); client.print(FEEDID); client.println(".csv HTTP/1.1"); client.println("Host: api.xively.com"); client.print("X-XivelyApiKey: "); client.println(APIKEY); client.print("User-Agent: "); client.println(USERAGENT); client.print("Content-Length: "); // calculate the length of the sensor reading in bytes: // 8 bytes for "sensor1," + number of digits of the data: int thisLength = 8 + getLength(thisData); client.println(thisLength); // last pieces of the HTTP PUT request: client.println("Content-Type: text/csv"); client.println("Connection: close"); client.println(); // here's the actual content of the PUT request: client.print("sensor1,"); client.println(thisData); } else { // if you couldn't make a connection: Serial.println("connection failed"); Serial.println(); Serial.println("disconnecting."); client.stop(); } // note the time that the connection was made or attempted: lastConnectionTime = millis(); } Easy way, using REST

#include char ssid[] = "SSID_HERE"; // your network SSID char pass[] = "PASS_HERE"; // your network password int status = WL_IDLE_STATUS; char xivelyKey[] = "API_KEY_HERE"; #define xivelyFeed FEED_ID_HERE char sensorID[] = "LIGHT_SENSOR_CHANNEL"; char ledID[] = "LED_CHANNEL"; // Analog pin which we're monitoring #define sensorPin A2 //led connected pin #define ledPin 9 // Define the strings for our datastream IDs XivelyDatastream datastreams[] = { XivelyDatastream(sensorID, strlen(sensorID), DATASTREAM_FLOAT), XivelyDatastream(ledID, strlen(ledID), DATASTREAM_FLOAT), }; // Finally, wrap the datastreams into a feed XivelyFeed feed(xivelyFeed, datastreams, 2 /* # datastreams */); WiFiClient client; XivelyClient xivelyclient(client);... Way faster, using Sockets see next slide for cont.

#include char ssid[] = "SSID_HERE"; // your network SSID char pass[] = "PASS_HERE"; // your network password int status = WL_IDLE_STATUS; char xivelyKey[] = "API_KEY_HERE"; #define xivelyFeed FEED_ID_HERE char sensorID[] = "LIGHT_SENSOR_CHANNEL"; char ledID[] = "LED_CHANNEL"; // Analog pin which we're monitoring #define sensorPin A2 //led connected pin #define ledPin 9 // Define the strings for our datastream IDs XivelyDatastream datastreams[] = { XivelyDatastream(sensorID, strlen(sensorID), DATASTREAM_FLOAT), XivelyDatastream(ledID, strlen(ledID), DATASTREAM_FLOAT), }; // Finally, wrap the datastreams into a feed XivelyFeed feed(xivelyFeed, datastreams, 2 /* # datastreams */); WiFiClient client; XivelyClient xivelyclient(client);... Way faster, using Sockets void loop() { //adjust LED level. set from Xively int getReturn = xivelyclient.get(feed, xivelyKey); if(getReturn > 0){ Serial.println("LED Datastream"); Serial.println(feed[1]); } else Serial.println("HTTP Error"); //write value to LED - change brightness int level = feed[1].getFloat(); if(level < 0){ level = 0; }else if(level > 255){ level = 255; } //actually write the value digitalWrite(ledPin, level); /////////////////////////////////////////////////////// //read sensor values int sensorValue = analogRead(sensorPin); datastreams[0].setFloat(sensorValue); //print the sensor valye Serial.print("Read sensor value "); Serial.println(datastreams[0].getFloat()); //send value to xively Serial.println("Uploading it to Xively"); int ret = xivelyclient.put(feed, xivelyKey); //return message Serial.print("xivelyclient.put returned "); Serial.println(ret); Serial.println(""); //delay between calls delay(15000); }

Awesome – So What?! 14 ?

“WebTasks” 15

Data-triggered “WebTask” Automation 16 triggers

Connection Services Google Docs Amazon Web Services Xively Facebook Twitter Flickr Google Maps … 17

Automatically generates code Choreos Streamline the arduous processes for everyday programming tasks Lots of “choreos” 2,

19

20

21

“Find it. Try it. Use it.” 22

23