SlideShare a Scribd company logo
DROIDS, JAVASCRIPT AND WEB
CONNECTED HARDWARE
JSConf China, July 11, 2015
Andrew Fisher @ajfisher
Press'S'forfullspeakernotes.
JS ALL THE REAL THINGS
(CC)FlickrQuasimodo
HARDWARE IS BECOMING MORE LIKE SOFTWARE
(CC)PhilFarugia
TODO
Why use JS for robotics?
Introduction to the NodeBots stack
Applications and examples
1.
2.
3.
WHY USE JAVASCRIPT FOR ROBOTICS?
(CC)FlickrJohnGreenaway
JAVASCRIPT IS TOO DYNAMIC TO BE PRECISE...
REAL HARDWARE ENGINEERS USE C...
WEB APPS DESIGNED BY HARDWARE ENGINEERS
WHY USE JS AND HARDWARE?
(CC)FlickrOskay
EVENTEMITTER
Twitter:@nodebotanist
THE REAL WORLD IS ALL EVENTS
(CC)Flickrtxmx2
OBJECTS NEED STRUCTURE AND FLEXIBILITY
var motor = new Five.Motor();
motor.start();
PROTOTYPES ARE GREAT
var left_motor = new Five.motor({controller: 'I2C'});
var right_motor = new Five.motor({controller: 'PCA34567'});
left_motor.start();
right_motor.stop();
left_motor.prototype.double_speed = function() { .. };
JS <3 ROBOTICS
(CC)Flickrhiperbolica
THE NODEBOTS STACK
JOHNNY FIVE
(C)JoanneDaudier
THE STACK
Controller board (sensors and actuators)
IO Plugin (communications protocol)
Johnny Five / NodeJS (application logic)
WS/HTTP (networking and security protocols)
Clients (UI, input, visualisation)
#
#
#
#
#
COMMON IMPLEMENTATION
Controller board (Arduino)
IO Plugin (Firmata over USB)
Johnny Five / NodeJS (application logic)
WS/HTTP (networking and security protocols)
Clients (UI, input, visualisation)
#
#
#
#
#
NODEBOTS HARDWARE
Servos, Motors, ESCs, Stepper motors
Accelerometers, Gyroscopes, Compasses, IMUs
Temperature, Proxitimity, Pressure sensors
LEDs, NeoPixels, Pixel matrices
Switches, Joysticks, Buttons
LCDs
#
#
#
#
#
#
INSTALLATION
Board development environment (eg Arduino)
Flash board with protocol (eg Firmata)
npm install johnny-five
Write code
...
Make an awesome robot
#
#
#
#
#
#
EXAMPLES AND APPLICATIONS
Glasses(C) |Image(CC)AndyGelme MatthewBergman
SIMPLEBOT
Simplebot(CC)AJFisher
NODE SKIRT
Skirt(C) |Image(CC)KassandraPerch MatthewBergman
TETRIS
(C)AdrianCatalan
THARP
(OSC)dtex
HELLO WORLD
(CC)FlickrDanielNovta
CIRCUIT
HARDWARE HELLO WORLD
var five = require("johnny-five");
if (process.argv[2] == null) {
console.log("You need to supply a device to connect to");
process.exit()
}
var board = five.Board({port: process.argv[2]});
board.on("ready", function() {
var led = new five.Led(10);
led.blink(500);
});
DEMONSTRATION
Imageoflivedemonstration.Code:led.js
WEB PAGE LED
var five = require("johnny-five");
if (process.argv[2] == null) {
console.log("Please supply a device to connect to");
process.exit();
}
// web server elements
var express = require('express');
var app = express();
var http = require('http');
var server = http.createServer(app);
var board;
//
//
// Set up the application server
//
WEB CONNECTED LIGHT
Imageoflivedemonstration.Code:webled.js
MBOT
(CC)AJFisher
MBOT DRIVE CODE
var five = require("johnny-five");
var max_speed_l = 150;
var max_speed_r = 140;
// set up the input
var stdin = process.openStdin();
require('tty').setRawMode(true);
var board = new five.Board({port: process.argv[2]});
var l_motor = r_motor = null;
board.on("ready", function(err) {
if (err){
console.log(err);
return;
}
DEMONSTRATION
Imageofalternativedemonstration.Code:mbot.js
LOOK FOR DROIDS
(CC)Flickr⣫⣤⣇⣤
NODEBOTS TONIGHT
Arduino IDE - arduino.cc
NodeJS installed
npm install johnny-five
github.com/jsconfcn/nodebots-session
#
#
#
#
INTERNATIONAL NODEBOTS DAY
July 25, 2015
nodebotsday.com
RESOURCES
johnny-five.org
gitter.im/rwaldron/johnny-five
node-ardx.org
Make JS Robotics book (BOOKJSROBOTICS at MakerShed)
#
#
#
#
DROIDS, JAVASCRIPT AND WEB
CONNECTED HARDWARE
JSConf China, July 11, 2015
Andrew Fisher @ajfisher

More Related Content

PDF
Building Droids with JavaScript
PDF
Datatium - using data as a material for contextually responsive design.
PDF
PDF
Bone.io for HTML5 Apps
PPT
"Probably, Maybe, No: The State of HTML5 Audio" - Scott Schiller
PDF
From dev to ops and beyond - getting it done
PDF
Electron(旧atom shell)基礎+入門
PPTX
Node.js Anti Patterns
Building Droids with JavaScript
Datatium - using data as a material for contextually responsive design.
Bone.io for HTML5 Apps
"Probably, Maybe, No: The State of HTML5 Audio" - Scott Schiller
From dev to ops and beyond - getting it done
Electron(旧atom shell)基礎+入門
Node.js Anti Patterns

What's hot (11)

KEY
Building MapAttack
PDF
Operationalizing Clojure Confidently
PDF
Building desktop applications with web technologies - ELECTRON the easy way
PDF
Iot demoday nov_2014
PDF
WebXR: A New Dimension For The Web Writing Virtual and Augmented Reality Apps...
PPTX
Academy PRO: HTML5 API graphics
PDF
Building Native Experiences with Electron
ODP
Extjs Howto
PDF
Google Developer Day: State of Ajax
PDF
Infrastructure as code might be literally impossible / Joe Domato (packageclo...
PDF
Bgnet a4 2
Building MapAttack
Operationalizing Clojure Confidently
Building desktop applications with web technologies - ELECTRON the easy way
Iot demoday nov_2014
WebXR: A New Dimension For The Web Writing Virtual and Augmented Reality Apps...
Academy PRO: HTML5 API graphics
Building Native Experiences with Electron
Extjs Howto
Google Developer Day: State of Ajax
Infrastructure as code might be literally impossible / Joe Domato (packageclo...
Bgnet a4 2
Ad

Similar to Droids, java script and web connected hardware (20)

PPTX
Nodebots
PPTX
Js robotics
PDF
Coding Mojo : Node.js Meetup
PDF
JavaOne 2015 : How I Rediscovered My Coding Mojo by Building an IoT/Robotics ...
PPTX
Hacking into IoT using JavaScript
PDF
Johnny-Five
PPTX
Controlling robots using javascript
PDF
Hardware for JavaScript Developers
PPTX
Bare metal Javascript & GPIO programming in Linux
PDF
Javascript all the things
PPTX
JavaScript Robotics #NodeWeek
PDF
IoT Tech Day Coding Mojo slides. Utrecht, April 2016
PPTX
JavaScript and Internet Controlled Electronics
ODP
Javascript on Arduino
PPT
nodebots presentation @seekjobs
PDF
JavaScript in the Real World
PPTX
From front-end to the hardware
PDF
Little bits & node.js IOT for beginner
PDF
How To Electrocute Yourself using the Internet
PPTX
JavaZone 2015 : NodeBots - JavaScript Powered Robots with Johnny-Five
Nodebots
Js robotics
Coding Mojo : Node.js Meetup
JavaOne 2015 : How I Rediscovered My Coding Mojo by Building an IoT/Robotics ...
Hacking into IoT using JavaScript
Johnny-Five
Controlling robots using javascript
Hardware for JavaScript Developers
Bare metal Javascript & GPIO programming in Linux
Javascript all the things
JavaScript Robotics #NodeWeek
IoT Tech Day Coding Mojo slides. Utrecht, April 2016
JavaScript and Internet Controlled Electronics
Javascript on Arduino
nodebots presentation @seekjobs
JavaScript in the Real World
From front-end to the hardware
Little bits & node.js IOT for beginner
How To Electrocute Yourself using the Internet
JavaZone 2015 : NodeBots - JavaScript Powered Robots with Johnny-Five
Ad

More from Andrew Fisher (14)

PPTX
A Device API Safari - Web Directions Code 2014
PDF
How well are you delivering your experience?
PDF
Designing a Moving Experience
PDF
The Wonderful-Amazing-Orientation-Motion-Sensormatic Machine
PPTX
Responsive content and user context
PPTX
Datatium - radiation free responsive experiences
ODP
Web Facilitated Play in the Real World
PPTX
Getting Touchy Feely with the Web
PDF
Arduino and the real time web
PDF
How the web is going physical
PPT
Device API - now with added fun
PPT
ad:tech Melbourne - Mobile and social strategies for retailers
ODP
The future of Australian mobile
ODP
Cloud Sourcing the Business
A Device API Safari - Web Directions Code 2014
How well are you delivering your experience?
Designing a Moving Experience
The Wonderful-Amazing-Orientation-Motion-Sensormatic Machine
Responsive content and user context
Datatium - radiation free responsive experiences
Web Facilitated Play in the Real World
Getting Touchy Feely with the Web
Arduino and the real time web
How the web is going physical
Device API - now with added fun
ad:tech Melbourne - Mobile and social strategies for retailers
The future of Australian mobile
Cloud Sourcing the Business

Recently uploaded (20)

PPT
Teaching material agriculture food technology
PDF
Empathic Computing: Creating Shared Understanding
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Machine learning based COVID-19 study performance prediction
PDF
Encapsulation theory and applications.pdf
PDF
Approach and Philosophy of On baking technology
PDF
cuic standard and advanced reporting.pdf
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Encapsulation_ Review paper, used for researhc scholars
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
Big Data Technologies - Introduction.pptx
PDF
Electronic commerce courselecture one. Pdf
PPTX
A Presentation on Artificial Intelligence
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
Teaching material agriculture food technology
Empathic Computing: Creating Shared Understanding
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Building Integrated photovoltaic BIPV_UPV.pdf
Chapter 3 Spatial Domain Image Processing.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Machine learning based COVID-19 study performance prediction
Encapsulation theory and applications.pdf
Approach and Philosophy of On baking technology
cuic standard and advanced reporting.pdf
NewMind AI Weekly Chronicles - August'25 Week I
Encapsulation_ Review paper, used for researhc scholars
“AI and Expert System Decision Support & Business Intelligence Systems”
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Dropbox Q2 2025 Financial Results & Investor Presentation
Per capita expenditure prediction using model stacking based on satellite ima...
Big Data Technologies - Introduction.pptx
Electronic commerce courselecture one. Pdf
A Presentation on Artificial Intelligence
Advanced methodologies resolving dimensionality complications for autism neur...

Droids, java script and web connected hardware