Intel Do-It-Yourself Challenge Lab 5: Controlling Galileo from a webpage Nicolas Vailliet www.Intel-Software-Academic-Program.com paul.guermonprez@intel.com.

Slides:



Advertisements
Similar presentations
1 How To Use a Browser A Module of the CYC Course – Computer Basics
Advertisements

Customizing Putty to work with Consuls. Step 1Get Putty Go to the website –
Intel Do-It-Yourself Challenge WiFi
Intel Do-It-Yourself Challenge Networking
Client-server practices DSC340 Mike Pangburn. Agenda Overview of client-server development Editing on client (e.g., Notepad) or directly on server (e.g.,
Win8 on Intel Programming Course Win8 for developers, in detail Cédric Andreolli Intel.
Win8 on Intel Programming Course Desktop : Introduction Cédric Andreolli Intel Software.
Win8 on Intel Programming Course Desktop : WPF Cédric Andreolli Intel Software
10+10 Descending the Design Funnel Chapter 1.4 in Sketching User Experiences: The Workbook.
Intel Do-It-Yourself Challenge Arduino Motor Shield Nicolas Vailliet Intel Software.
Intel Do-It-Yourself Challenge node.js
The State Transition Diagram
Win8 on Intel Programming Course Desktop : Sensors Cédric Andreolli Intel Software
Intel Do-It-Yourself Challenge Intel Galileo and Edison Paul Guermonprez Intel Software.
Internet of Things with Intel Edison Getting started with your board Pierre Collet Intel.
Internet of Things with Intel Edison Web controller
Intel Do-It-Yourself Challenge Lab 3: A demo with LED and sensor
Internet of Things with Intel Edison GPIO on Edison
Win8 on Intel Programming Course Win8 and Intel Paul Guermonprez Intel Software
Intel Do-It-Yourself Challenge Sensors Nicolas Vailliet Intel Software
Intel Do-It-Yourself Challenge Pololu USB Controller Nicolas Vailliet Intel Software.
Intel Do-It-Yourself Challenge : Let’s build an autonomous drone Paul Guermonprez Intel.
The Keyboard Study Lecture /slide deck produced by Saul Greenberg, University of Calgary, Canada Notice: some material in this deck is used from other.
Intel Do-It-Yourself Challenge Arduino sketches and full SD image Nicolas Vailliet Intel.
The Branching Storyboard Chapter 4.3 in Sketching the User Interface: The Workbook Image from:
Internet of Things with Intel Edison Presentation Paul Guermonprez Intel Software
Win8 on Intel Programming Course Desktop : Perceptual Computing Cédric Andreolli Intel.
ESE Einführung in Software Engineering N. XXX Prof. O. Nierstrasz Fall Semester 2009.
ESE Einführung in Software Engineering X. CHAPTER Prof. O. Nierstrasz Wintersemester 2005 / 2006.
Metamodeling Seminar X. CHAPTER Prof. O. Nierstrasz Spring Semester 2008.
ESE Einführung in Software Engineering X. CHAPTER Prof. O. Nierstrasz Wintersemester 2005 / 2006.
N. XXX Prof. O. Nierstrasz Thanks to Jens Palsberg and Tony Hosking for their kind permission to reuse and adapt the CS132 and CS502 lecture notes.
Internet of Things with Intel Edison Led sensor lab
Introduction to the Raspberry Pi ® Saman Amighi 10/2013 ® Raspberry Pi Foundation.
CP — Concurrent Programming X. CHAPTER Prof. O. Nierstrasz Wintersemester 2005 / 2006.
12. eToys. © O. Nierstrasz PS — eToys 12.2 Denotational Semantics Overview:  … References:  …
SWOT Analysis Strengths Weaknesses SWOT Opportunities Threats.
Sequential Storyboards Chapter 4.1 in Sketching the User Interface: The Workbook Image from:
Intel Do-It-Yourself Challenge Hello World with the Arduino IDE Nicolas Vailliet Intel.
Intel Do-It-Yourself Challenge Lab 1: Intel Galileo’s Arduino side Nicolas Vailliet
CPSC 581 Human Computer Interaction II Interaction Design Lecture /slide deck produced by Saul Greenberg, University of Calgary, Canada Notice: some material.
Intel Do-It-Yourself Challenge Lab 2: Intel Galileo’s Linux side Nicolas Vailliet Intel.
Collecting Images & Clippings Chapter 2.3 in Sketching User Experiences: The Workbook.
With Internet Explorer 8© 2011 Pearson Education, Inc. Publishing as Prentice Hall1 Go! with Internet Explorer 8 Getting Started.
Graphical Screen Design Part 1: Contrast, Repetition, Alignment, Proximity Lecture /slide deck produced by Saul Greenberg, University of Calgary, Canada.
Win8 on Intel Programming Course Modern UI : Sensors Cédric Andreolli Intel Software.
IT 210 The Internet & World Wide Web introduction.
Win8 on Intel Programming Course Modern UI : Features Cédric Andreolli Intel Software.
Intel Do-It-Yourself Challenge OpenCV
Win8 on Intel Programming Course The challenge Paul Guermonprez Intel Software
1 John Magee 9 November 2012 CS120 Lecture 17a: Publishing Web pages.
Win8 on Intel Programming Course Modern UI HelloWorld in HTML5/JS Cédric Andreolli Intel.
What is a sketch? Chapter 1.2 addendum Sketching User Experiences: The Workbook.
Internet of Things with Intel Edison Compiling and running Pierre Collet Intel Software.
1 Installation When this module is complete, you will be able to:  Set a static IP address for your laptop  Install the snom ONE software  Navigate.
The Animated Sequence Chapter 5.1 in Sketching User Experiences: The Workbook.
Intel Do-It-Yourself Challenge Wi-Fi Nicolas Vailliet Intel Software
Internet of Things with Intel Edison CylonJS Pierre Collet Intel Software
Sketching Vocabulary Chapter 3.4 in Sketching User Experiences: The Workbook Drawing objects, people, and their activities.
Win8 on Intel Programming Course Paul Guermonprez Intel Software
Getting To Know Computers COMPUTER BASICS. WHAT IS A COMPUTER? A computer is an electronic device that manipulates information, or “data.” It has the.
Design of Everyday Things Part 2: Useful Designs? Lecture /slide deck produced by Saul Greenberg, University of Calgary, Canada Images from:
The Narrative Storyboard Chapter 4.4 in Sketching User Experiences: The Workbook.
Images of pesticides By: Leslie London, University of Cape Town This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 2.5.
438 labs. Labs Lab 1: Refreshing C and Linux Programming 2 Lab 1: Refreshing C and Linux Programming 2 – First: Getting familiar with development.
PHPBelgium – Belgian PHP community PHPBelgium event MVC = Make Venerated Code? Patrick Allaert.
Sketching Vocabulary Chapter 3.4 in Sketching User Experiences: The Workbook Drawing objects, people, and their activities.
Agenda Video pre-presentations Digital sketches & photo traces
Methodology Overview 2 basics in user studies Lecture /slide deck produced by Saul Greenberg, University of Calgary, Canada Notice: some material in this.
bitcurator-access-webtools Quick Start Guide
Presentation transcript:

Intel Do-It-Yourself Challenge Lab 5: Controlling Galileo from a webpage Nicolas Vailliet www.Intel-Software-Academic-Program.com paul.guermonprez@intel.com Intel Software 2014-02-01

Prerequisites and objectives We assume that: You are able to download an archive, to unzipped it and run a program under the OS you’re familiar to. You are able to read pieces of code and comments written in C-like language. Our objective are: Given a Galileo board and a laptop connected on the same network, you will be able to write node.js code to control galileo from a webpage, displayed in your laptop’s browser. In general, Our goal is to teach you a little bit of node.js, as it is one of the most employed technology in IoT.

Before you start

What do you need? Desktop OS We assume you’re under Microsoft Windows. Linux and Mac users should not have any problem to do the same. Hardware - An Intel Galileo Development Board. - The box comes with power supply and cable. - A Wi-Fi adaptor (N-2200 Mini-PCIe) - A micro SD card (8GB with the full Linux image we provide) Software - A SSH client like Putty for Windows. Mac and Linux users only need a terminal. http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html - Set up system date to avoid certificate expiration issue - Install Galileo-io node on your Galileo board (Optional: You can install node.js on your laptop to test your program before).

Web LED controller demo

Web LED controller demo Galileo-io module This node.js module allows you to access GPIO without dealing with files from Linux file system (and the mapping stuff). Functions have the same name as Arduino library ones. Importing this module var Galileo = require("galileo-io"); var board = new Galileo(); TurnOnLed function function turnOnLed(){ board.digitalWrite(8, 1); } A simple HTTP server var http = require('http'); http.createServer(function (req, res) { function respond() { res.writeHead(200, { "Content-Type": "text/html" }); res.end(“Hello World"); }).listen(1337);

Web LED controller demo A respond function with a basic html page function respond() { res.writeHead(200, { "Content-Type": "text/html" }); res.write("<!DOCTYPE html><html><body>"); res.write("<h1>Intel Galileo web controller</h1>"); res.write("<p>Sensor value : "); res.write(sensorvalue); res.write("</p><p>LED Status : "); res.write(ledstatus); res.write("</p><p>Action</p>"); res.write("<p><input type='button' onclick='location.reload();' value='Refresh'/></p>"); res.write("<p><input type='button' onclick='window.location = \"http://192.168.2.134:1337/ledOn\"' value='Turn LED on'/></p>"); res.write("<p><input type='button' onclick='window.location = \"http://192.168.2.134:1337/ledOff\"' value='Turn LED off'/></p>"); res.write("</body></html>"); res.end(); }

Web LED controller demo Looking the server-side URL to determine the command console.log("Request: " + req.url); if(req.url === "/ledOn") turnOnLed(); else if(req.url === "/ledOff") turnOffLed(); respond(); }).listen(1337); console.log('Server running at http://localhost:1337/'); } Running the server startServer();

Web LED controller demo Open your browser Access the URL : http://192.168.2.1XX:1337/ Click on buttons to test your implementation!

Next steps Controlling servo motors USB ports on Galileo are useful. Let’s control servo motor! Implement your own projects Want a remote for Galileo? Do it under Android! Another idea? Let’s make it!

License Creative Commons – By 3.0 You are free: to Share — to copy, distribute and transmit the work to Remix — to adapt the work to make commercial use of the work Under the following conditions: Attribution — You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work). With the understanding that: Waiver — Any of the above conditions can be waived if you get permission from the copyright holder. Public Domain — Where the work or any of its elements is in the public domain under applicable law, that status is in no way affected by the license. Other Rights — In no way are any of the following rights affected by the license: Your fair dealing or fair use rights, or other applicable copyright exceptions and limitations; The author's moral rights; Rights other persons may have either in the work itself or in how the work is used, such as publicity or privacy rights. Notice — For any reuse or distribution, you must make clear to others the license terms of this work. The best way to do this is with a link to this web page. http://creativecommons.org/licenses/by/3.0/