javascript all the things

55
JAVASCRIPT ALL THE THINGS #HANNOVERJS 11/2013 @FELIXWAHNER / @NEUWAERTS_DE 1

Upload: felix-wahner

Post on 28-Jan-2015

113 views

Category:

Technology


0 download

DESCRIPTION

With upcoming controllers like Espruino and Tessel as well as new, programmable input devices (leap motion, ocolus rift) and their respective JS-APIs, javascript is steadily evolving and shifting into the physical world. Felix will give a short introduction about the current state of "javascript in the real world" and bring some ideas and stuff to play with.

TRANSCRIPT

Page 1: Javascript all the things

JAVASCRIPT ALL THE THINGS#HANNOVERJS 11/2013 !!!!!!!!!@FELIXWAHNER / @NEUWAERTS_DE

!1

Page 2: Javascript all the things

WHAT IS THIS TALK THIS ABOUT?• Javascript (obviously)

• Things (literally)

!2

Page 3: Javascript all the things

WHAT IS THIS TALK THIS ABOUT?• Javascript

• Frontend• Server

• Hardware

• Things

• Hardware• Gadgets

!3

Page 4: Javascript all the things

WHAT IS THIS TALK THIS ABOUT?• Javascript

• Frontend• Server

• Hardware

• Things

• Hardware• Gadgets

!4

Page 5: Javascript all the things

WHAT IS THIS TALK THIS ABOUT?• Javascript

• Frontend• Server

• Hardware

• Things

• Hardware• Gadgets

!5

Page 6: Javascript all the things

WHAT IS THIS TALK THIS ABOUT?• Javascript

• Frontend• Server

• Hardware

• Things

• Hardware• Gadgets

!6

Page 7: Javascript all the things

WHAT IS THIS TALK THIS ABOUT?• Javascript

• Frontend• Server

• Hardware

• Things

• Hardware• Gadgets

!7

Page 8: Javascript all the things

LET ME INTRODUCE MYSELF

!8

Page 9: Javascript all the things

THAT’S ME• Felix Wahner

• @felixwahner

• 32 yrs old

• Father, Designer, Frontend Developer, Fulltime Nerd

• CTO @neuwaerts_de

• blogs @ neuwaerts.de/emerge

!9

Page 10: Javascript all the things

���10

Page 11: Javascript all the things

���11

Page 12: Javascript all the things

���12

Page 13: Javascript all the things

ALRIGHT: LET’S GO!

!13

Page 14: Javascript all the things

INTERNET OF THINGS A BRIEF INTRODUCTION• A connection of „Things“ (real world objects) with

our beloved InternetsTM

• Enriches all day life experience with Facebook like counters awesome metadata and functionality

• Will hopefully make our lives a lot easier

!14

Page 15: Javascript all the things

RATHER OBVIOUS

EXAMPLES

Google Glass Image: http://www.aha-soft.com !15

Page 16: Javascript all the things

NOT SO OBVIOUS

EXAMPLES

http://commons.wikimedia.org/wiki/File:Cow_female_black_white.jpg

!16

Page 17: Javascript all the things

NOT SO OBVIOUS

EXAMPLES

http://commons.wikimedia.org/wiki/File:Cow_female_black_white.jpg

A street sign that adjusts its contents and directions based on user input: !!http://breakfastny.com/points/

Dutch Company „Sparked“ is using wireless sensors on cattle !!!!http://www.iotworks.com/#!sensors/c14wo

Dominic Wilcox has created a fully functional prototype pair of shoes that will guide the wearer to any destination !!!http://dominicwilcox.com/portfolio/gpsshoe/

!17

Page 18: Javascript all the things

PROTOTYPING, PHYSICAL COMPUTING PLATFORMS AND

THE MAKER MOVEMENT

!18

Page 19: Javascript all the things

IN THE BEGINNING THERE WAS

ARDUINO

• Created 2000 by Massimo Banzi • Open Source Hardware and Software • Extendable, Programmable

http://arduino.cc/ !19

Page 20: Javascript all the things

!

RASPBERRY PI

• First version released in 2011 • credit-card-sized single-board computer

http://www.raspberrypi.org/ !20

Page 21: Javascript all the things

!

ESPRUINO

• 2013 (to be released) • JavaScript interpreter for microcontrollers

http://www.espruino.com/ !21

Page 22: Javascript all the things

BONUS :)

MAKEY MAKEY

http://www.makeymakey.com/

• An Invention Kit for Everyone • Turn everyday objects into touchpads and combine them with the internet

!22

Page 23: Javascript all the things

BONUS :)

MAKEY MAKEY

http://www.makeymakey.com/ - Foto: http://www.flickr.com/photos/raster/8605560001/!23

Page 24: Javascript all the things

MORE INTERESTING DEVICESI BROUGHT SOME WITH ME FEEL FREE TO TRY THEM RIGHT HERE.

!24

Page 25: Javascript all the things

!

LEAP MOTION

• Motion Sensing Device • Browse the web, read articles, flip through photos, and play music just by lifting a finger

• API & App ecosystem

https://www.leapmotion.com/ && https://developer.leapmotion.com/ !25

Page 26: Javascript all the things

!

SPHERO

• It's the world's first robotic ball that you control with a tilt, touch, or swing from your smartphone or tablet

• API and SDK

www.gosphero.com && https://developer.gosphero.com/ !26

Page 27: Javascript all the things

!

OCULUS RIFT

• virtual reality head-mounted display • API and SDK

http://www.oculusvr.com/ && https://developer.oculusvr.com/ !27

Page 28: Javascript all the things

!28

Page 29: Javascript all the things

AND MANY MORE!

!29

Page 30: Javascript all the things

NOTICED SOMETHING?ALL THESE THINGS ARE EITHER PROGRAMMABLE OR HAVE AN API

!30

Page 31: Javascript all the things

NOTICED SOMETHING?ALL THESE THINGS ARE EITHER PROGRAMMABLE OR HAVE AN API

!31

Page 32: Javascript all the things

SO LETS TALK ABOUTALL THE THINGS!

!32

Page 33: Javascript all the things

SO LETS TALK ABOUTALL THE THINGS! EXCEPT FOR THE COWS.

!33

Page 34: Javascript all the things

SO LETS TALK ABOUTJAVASCRIPT ALL THE THINGS! !

!

!

… FINALLY! :)!34

Page 35: Javascript all the things

!

WHY JAVASCRIPT?• Easy to learn

• Asynchronous

• Popular, great Community

• Awesome because it’s not C. :)

• The last one might depend on who you’re talking to

!35

Page 36: Javascript all the things

–Jeff Atwood / The Principle of Least Power

„Any application that can be written in JavaScript, will eventually be written in JavaScript“

http://www.codinghorror.com/blog/2007/07/the-principle-of-least-power.html!36

Page 37: Javascript all the things

!

WHAT CAN BE DONE VIA JS?Build the Frontend (if needed)

Build your Server/Services (i.e. with node.js)

End to end communication (WebRTC)

Hardware Read/Write (node-serialport)

!37

Page 38: Javascript all the things

!

WHAT CAN BE DONE VIA JS?Build the Frontend (if needed)

Build your Server/Services (i.e. with node.js)

End to end communication (WebRTC)

Hardware Read/Write (node-serialport)

!38

Page 39: Javascript all the things

EXAMPLES & LIBRARIES

!39

Page 40: Javascript all the things

!

NODUINO

• A simple and flexible JavaScript and Node.js Framework for accessing basic Arduino controls from Web Applications using HTML5, Socket.IO and Node.js.

http://semu.github.io/noduino/ !40

Page 41: Javascript all the things

!

NODUINO

http://semu.github.io/noduino/

var Noduino = new NoduinoObj({debug: true, host: 'http://localhost:8090'}, Connector); Noduino.connect(function(err, board) { if (err) { return console.log(err); } board.withButton({pin: 13}, function(err, Button) { if (err) { return console.log(err); } Button.on('push', function() } console.log('Button pushed'); }); Button.push(); }); });

!41

Page 42: Javascript all the things

!

JOHNNY FIVE

• Johnny-Five is an Open Source, JavaScript Arduino programming framework

• developed at Bocoup (yup: these guys that contribute to almost all major JS projects).

https://github.com/rwaldron/johnny-five && http://bocoup.com/ !42

Page 43: Javascript all the things

JOYSTICK CONTROLLED LASER

JOHNNY FIVE

http://jsfiddle.net/rwaldron/YHb7A/show/light/

var five = require("../lib/johnny-five.js"), board = five.Board({ debug: true }); board.on("ready", function() { var range, pan, tilt, joystick; range = [ 0, 170 ]; // Servo to control panning pan = five.Servo({ pin: 9, range: range }); // Servo to control tilt tilt = five.Servo({ pin: 10, range: range }); // Joystick to control pan/tilt // Read Analog 0, 1 // Limit events to every 100ms joystick = five.Joystick({ pins: [ "A0", "A1" ], freq: 100 }); // Center all servos (five.Servos()).center(); joystick.on("axismove", function() { tilt.move( Math.ceil(170 * this.fixed.y) ); pan.move( Math.ceil(170 * this.fixed.x) ); });

!43

Page 44: Javascript all the things

!

NODE AR-DRONE

• An implementation of the networking protocols used by the Parrot AR Drone 2.0.

https://github.com/felixge/node-ar-drone !44

Page 45: Javascript all the things

!

!

NODE AR-DRONE

http://semu.github.io/noduino/

var arDrone = require('ar-drone'); var client = arDrone.createClient(); !client.takeoff(); !client .after(5000, function() { this.clockwise(0.5); }) .after(3000, function() { this.stop(); this.land(); });

!45

Page 46: Javascript all the things

!

NODE AR-DRONE: NODECOPTER

• „There’s a meet up for that!“ • http://nodecopter.com/ • @nodeCopter

https://github.com/felixge/node-ar-drone !46

Page 47: Javascript all the things

OK, THIS WAS QUITE A LOT OF GEEKY GADGET STUFF. BUT HOW

DOES THIS FIT INTO MY BUSINESS MODEL?

!47

Page 48: Javascript all the things

BRITISH AIRWAYS

BILLBOARD CAMPAIGN

• Combines IoT with Classic Campaign • Get’s a lot of „buzz“ • Would be easy to implement with JS:

• Flights API • Kinect (node-kinect ) • Some very expensive large screen :)

http://mashable.com/2013/11/25/british-airways-billboard/ && https://github.com/pgte/node-kinect!48

Page 49: Javascript all the things

C&A

FASHION LIKE• Shows 'Likes' on their respective Clothing Racks

• Combines IoT with Classic Campaign • Get’s a lot of „buzz“ • Would be easy to implement with JS:

• Facebook Graph-API • Arduino Mini • Some very cheap small led screens :)

http://infosthetics.com/archives/2012/05/ca_fashion_like_real-time_facebook_likes_shown_on_clothing_racks.html!49

Page 50: Javascript all the things

HYPOTHESIS(TOUCH)SCREENS WILL DIE SOON

!50

Page 51: Javascript all the things

HYPOTHESISTHE INTERNET AND SENSORS WILL INFILTRATE EVERYTHING

!51

Page 52: Javascript all the things

HYPOTHESISTHERE WILL BE NEW, MORE INTUITIVE, MORE PRECISE INPUT AND OUTPUT DEVICES

!52

Page 53: Javascript all the things

!

A FUTURE VISION$("livingroom").bind( "motion", function() {

$(this).find("lights").brightness("75%").dimAfter("120s");

});

http://www.voodootikigod.com/nodebots-the-rise-of-js-robotics/ !53

Page 54: Javascript all the things

THANKS FOR LISTENING!NOW GO BUILD SOMETHING AWESOME BE SURE TO SHARE & TWEET US ABOUT IT!

!54

Page 55: Javascript all the things

QUESTIONS? FEEDBACK?DROP ME A LINE: @FELIXWAHNER !

…AND BE SURE TO VISIT OUR BLOG. THERE WILL BE MORE #IOT POSTS COMING SOON: HTTP://NEUWAERTS.DE/EMERGE

!55