Altering the real world with JavaScript - JSConf.US 2015

Preview:

Citation preview

altering the real worldwith JavaScript

Jan Jongboom JSConf.US 2015

Telenor R&D

@janjongboomMozilla

We're on the verge of a new era

alert('Hello ' + prompt('Your name?'))

take code into the real world

JUSTthe revolution is

getting started

Audience participation!

and GIFs!

Computer generated

music

http://gibber.mat.ucsb.edu/

1 a = Drums('x*o*x*o-')

Gibber

Gibber 1 a = Drums('x*o*x*o-') 2 a.pitch = 0.5

Gibber 1 a = Drums('x*o*x*o-') 2 3 speak = Speak({ pitch: 70, wordgap:5 }) 4 .say.seq( 5 ['J', 'S', 'Conf'], 6 [1/4, 1/4, 1/4, 1/2].rnd() 7 ) 8 9 speak.pitch.seq( [1,.8,1.2].rnd() ) 10 Clock.bpm = 120;

Gibber 1 a = Drums('x*o*x*o-') 2 3 speak = Speak({ pitch: 70, wordgap:5 }) 4 .say.seq( 5 ['J', 'S', 'Conf'], 6 [1/4, 1/4, 1/4, 1/2].rnd() 7 ) 8 9 speak.pitch.seq( [1,.8,1.2].rnd() ) 10 Clock.bpm = 120;

So much phones!

Go to http://192.168.158.139:9321

Gibber

(JSConf2015_Track_A)

Gibber 1 a = Drums('x*o*x*o-') 2 a.pitch = Phone.X

https://github.com/janjongboom/jsconf-us/blob/master/gibber/gibber-phone.js

Go to http://192.168.158.139:9321

Getting data out of thereal world

Bluetooth beaconsBroadcasting their existence

Bluetooth beaconsLong battery life

Cheap URLs, sensor values, etc.

Coming to a web browser near youhttps://bugzilla.mozilla.org/show_bug.cgi?id=1063444

Scanning beacons 1 var adapter = navigator.mozBluetooth.defaultAdapter 2 adapter.startLeScan([]).then(handle => { 3 handle.ondevicefound = e => { 4 // handle e.scanRecord 5 } 6 7 setTimeout(() => { 8 adapter.stopLeScan(handle) 9 }, 5000) 10 }, err => console.error(err))

JavaScript baby monitorTag your baby with a phone

Get three beacons Some math

http://janos.io

DEMO TIMEhttp://192.168.159:139:9321

One more thing...

Firefox OS isnot just aboutphones

BLE, VR, WebCL

WearableAugmenting reality Hyperlocal services

Open standards

mozillaglass

mozilla glassWorks with any glasses No extra device required Voice controlled Self build kit ~$300

Camera module

Display & sensors

WebRTC

Mirror

We can't predict the future(It's 2015, where's my hoverboard?!)

THANK YOU!

@janjongboomgithub.com/janjongboom/jsconf-us

Recommended