SlideShare une entreprise Scribd logo
1  sur  39
Télécharger pour lire hors ligne
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

Contenu connexe

Tendances

Tendances (11)

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

Similaire à Droids, java script and web connected hardware

Similaire à Droids, java script and web connected hardware (20)

Why use JavaScript in Hardware? GoTo Conf - Berlin
Why use JavaScript in Hardware? GoTo Conf - Berlin Why use JavaScript in Hardware? GoTo Conf - Berlin
Why use JavaScript in Hardware? GoTo Conf - Berlin
 
Analyzing the Performance of Mobile Web
Analyzing the Performance of Mobile WebAnalyzing the Performance of Mobile Web
Analyzing the Performance of Mobile Web
 
JavaScript in the Real World
JavaScript in the Real WorldJavaScript in the Real World
JavaScript in the Real World
 
Raspberry Pi 2 + Windows 10 IoT Core + Node.js
Raspberry Pi 2 + Windows 10 IoT Core + Node.jsRaspberry Pi 2 + Windows 10 IoT Core + Node.js
Raspberry Pi 2 + Windows 10 IoT Core + Node.js
 
The internet of (lego) trains
The internet of (lego) trainsThe internet of (lego) trains
The internet of (lego) trains
 
4 Node.js Gotchas: What your ops team needs to know
4 Node.js Gotchas: What your ops team needs to know4 Node.js Gotchas: What your ops team needs to know
4 Node.js Gotchas: What your ops team needs to know
 
(C)NodeJS
(C)NodeJS(C)NodeJS
(C)NodeJS
 
Web of Technologies
Web of TechnologiesWeb of Technologies
Web of Technologies
 
NTT SIC marketplace slide deck at Tokyo Summit
NTT SIC marketplace slide deck at Tokyo SummitNTT SIC marketplace slide deck at Tokyo Summit
NTT SIC marketplace slide deck at Tokyo Summit
 
Robotic JavaScript
Robotic JavaScriptRobotic JavaScript
Robotic JavaScript
 
Web of Technologies Again
Web of Technologies AgainWeb of Technologies Again
Web of Technologies Again
 
The Awesome jOOQ JavaOne Talk
The Awesome jOOQ JavaOne TalkThe Awesome jOOQ JavaOne Talk
The Awesome jOOQ JavaOne Talk
 
Ionic 4 + capacitor + angular 7
Ionic 4 +  capacitor + angular 7 Ionic 4 +  capacitor + angular 7
Ionic 4 + capacitor + angular 7
 
Don't Over-React - just use Vue!
Don't Over-React - just use Vue!Don't Over-React - just use Vue!
Don't Over-React - just use Vue!
 
Hunting Performance Problems in Node.js and beyond
Hunting Performance Problems in Node.js and beyondHunting Performance Problems in Node.js and beyond
Hunting Performance Problems in Node.js and beyond
 
PyConZA 2019 Keynote - Deep Neural Networks for Video Applications
PyConZA 2019 Keynote - Deep Neural Networks for Video ApplicationsPyConZA 2019 Keynote - Deep Neural Networks for Video Applications
PyConZA 2019 Keynote - Deep Neural Networks for Video Applications
 
Why a zynq should power your next project
Why a zynq should power your next projectWhy a zynq should power your next project
Why a zynq should power your next project
 
Internet of Things Magic Show
Internet of Things Magic ShowInternet of Things Magic Show
Internet of Things Magic Show
 
Hardware Hacking
Hardware HackingHardware Hacking
Hardware Hacking
 
stackconf 2021 | Why you should take care of infrastructure drift
stackconf 2021 | Why you should take care of infrastructure driftstackconf 2021 | Why you should take care of infrastructure drift
stackconf 2021 | Why you should take care of infrastructure drift
 

Plus de Andrew Fisher

Designing a Moving Experience
Designing a Moving ExperienceDesigning a Moving Experience
Designing a Moving Experience
Andrew Fisher
 

Plus de Andrew Fisher (14)

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

Dernier

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Dernier (20)

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 

Droids, java script and web connected hardware