JavaScript -...

26

Transcript of JavaScript -...

Page 1: JavaScript - events17.linuxfoundation.orgevents17.linuxfoundation.org/sites/events/files/slides/NodeJS_Powerpoint.pdf · What is the Internet of Things? (IoT) Physical objects with
Page 2: JavaScript - events17.linuxfoundation.orgevents17.linuxfoundation.org/sites/events/files/slides/NodeJS_Powerpoint.pdf · What is the Internet of Things? (IoT) Physical objects with

JavaScript and the Internet of Things

Andrew Chalkley, Treehouse@chalkers

Page 3: JavaScript - events17.linuxfoundation.orgevents17.linuxfoundation.org/sites/events/files/slides/NodeJS_Powerpoint.pdf · What is the Internet of Things? (IoT) Physical objects with

What is the Internet of Things? (IoT)Physical objects with embedded with electronics, sensors and software connected to the internet*.

Page 4: JavaScript - events17.linuxfoundation.orgevents17.linuxfoundation.org/sites/events/files/slides/NodeJS_Powerpoint.pdf · What is the Internet of Things? (IoT) Physical objects with

IoT Examples• Smart Thermostat• Security Systems• Smart Scales• Health Monitor• Fitness Tracker• Smart Mirror

Page 5: JavaScript - events17.linuxfoundation.orgevents17.linuxfoundation.org/sites/events/files/slides/NodeJS_Powerpoint.pdf · What is the Internet of Things? (IoT) Physical objects with

History of Hobbyist Electronics*• Pre-Arduino Era• Expensive - 💰💰💰

• Arduino Era• Cheap(er) - 💰

• Today• Moore’s Law Means Powerful Devices…

Page 6: JavaScript - events17.linuxfoundation.orgevents17.linuxfoundation.org/sites/events/files/slides/NodeJS_Powerpoint.pdf · What is the Internet of Things? (IoT) Physical objects with

JavaScript

Page 7: JavaScript - events17.linuxfoundation.orgevents17.linuxfoundation.org/sites/events/files/slides/NodeJS_Powerpoint.pdf · What is the Internet of Things? (IoT) Physical objects with

JavaScript IoT Strategies• JavaScript Only Microcontrollers• Embedded Linux Devices• Hybrid Solutions

Page 8: JavaScript - events17.linuxfoundation.orgevents17.linuxfoundation.org/sites/events/files/slides/NodeJS_Powerpoint.pdf · What is the Internet of Things? (IoT) Physical objects with

JavaScript Only Microcontrollers• Tessel 1• Espruino / Espruino Pico• ESP8266 / NodeMCU*

Page 9: JavaScript - events17.linuxfoundation.orgevents17.linuxfoundation.org/sites/events/files/slides/NodeJS_Powerpoint.pdf · What is the Internet of Things? (IoT) Physical objects with

Tessel 1

Page 10: JavaScript - events17.linuxfoundation.orgevents17.linuxfoundation.org/sites/events/files/slides/NodeJS_Powerpoint.pdf · What is the Internet of Things? (IoT) Physical objects with

Tessel 1Cons• It gets bulky• Expensive• It’s no longer available

Pros• Built-in Wireless• Plug and play modules• Node.js compatible* • BYO Editor

Page 11: JavaScript - events17.linuxfoundation.orgevents17.linuxfoundation.org/sites/events/files/slides/NodeJS_Powerpoint.pdf · What is the Internet of Things? (IoT) Physical objects with

Espruino / Espruino Pico

Page 12: JavaScript - events17.linuxfoundation.orgevents17.linuxfoundation.org/sites/events/files/slides/NodeJS_Powerpoint.pdf · What is the Internet of Things? (IoT) Physical objects with

Espruino / Espruino PicoPros•Web IDE• Small / easily

embeddable• Community Forum

Cons•Web IDE• It’s just a thing• Lots of soldering• Expensive• Uncharted seas

Page 13: JavaScript - events17.linuxfoundation.orgevents17.linuxfoundation.org/sites/events/files/slides/NodeJS_Powerpoint.pdf · What is the Internet of Things? (IoT) Physical objects with

wifigotchi.com

Page 14: JavaScript - events17.linuxfoundation.orgevents17.linuxfoundation.org/sites/events/files/slides/NodeJS_Powerpoint.pdf · What is the Internet of Things? (IoT) Physical objects with

ESP8266 / NodeMCU

Page 15: JavaScript - events17.linuxfoundation.orgevents17.linuxfoundation.org/sites/events/files/slides/NodeJS_Powerpoint.pdf · What is the Internet of Things? (IoT) Physical objects with

Embedded Linux Devices• Tessel 2• Raspberry Pi• C.H.I.P.

Page 16: JavaScript - events17.linuxfoundation.orgevents17.linuxfoundation.org/sites/events/files/slides/NodeJS_Powerpoint.pdf · What is the Internet of Things? (IoT) Physical objects with

Tessel 2

Page 17: JavaScript - events17.linuxfoundation.orgevents17.linuxfoundation.org/sites/events/files/slides/NodeJS_Powerpoint.pdf · What is the Internet of Things? (IoT) Physical objects with

Raspberry Pi A+ / 2 B

Page 18: JavaScript - events17.linuxfoundation.orgevents17.linuxfoundation.org/sites/events/files/slides/NodeJS_Powerpoint.pdf · What is the Internet of Things? (IoT) Physical objects with

Raspberry Pi Zero

Page 19: JavaScript - events17.linuxfoundation.orgevents17.linuxfoundation.org/sites/events/files/slides/NodeJS_Powerpoint.pdf · What is the Internet of Things? (IoT) Physical objects with

C.H.I.P.

Page 20: JavaScript - events17.linuxfoundation.orgevents17.linuxfoundation.org/sites/events/files/slides/NodeJS_Powerpoint.pdf · What is the Internet of Things? (IoT) Physical objects with

Embedded Linux DevicesPros• Runs any software• Can be cheaper than

microcontrollers•Mature ecosystems

Cons• Needs to boot up• IO is not as responsive•More points of failure and

attack• Expensive

Page 21: JavaScript - events17.linuxfoundation.orgevents17.linuxfoundation.org/sites/events/files/slides/NodeJS_Powerpoint.pdf · What is the Internet of Things? (IoT) Physical objects with

Hybrid Solutions

Page 22: JavaScript - events17.linuxfoundation.orgevents17.linuxfoundation.org/sites/events/files/slides/NodeJS_Powerpoint.pdf · What is the Internet of Things? (IoT) Physical objects with

Hybrid Solutions

Page 23: JavaScript - events17.linuxfoundation.orgevents17.linuxfoundation.org/sites/events/files/slides/NodeJS_Powerpoint.pdf · What is the Internet of Things? (IoT) Physical objects with

Hybrid Solutions

Page 24: JavaScript - events17.linuxfoundation.orgevents17.linuxfoundation.org/sites/events/files/slides/NodeJS_Powerpoint.pdf · What is the Internet of Things? (IoT) Physical objects with

Hybrid SolutionsPros• You can program at a

high level•Get the benefits of both

worlds• modern platform • responsive IO

Cons• You’re dealing with more

devices•More hacky• Even more points of

failure / attack•Most expensive

Page 25: JavaScript - events17.linuxfoundation.orgevents17.linuxfoundation.org/sites/events/files/slides/NodeJS_Powerpoint.pdf · What is the Internet of Things? (IoT) Physical objects with

The Present (and Future) is Awesome!• Cheaper Embedded Linux Computers EVERYWHERE• Use Modern Full Stack JavaScript• Any Stack!

• We need help to make it mature!

Page 26: JavaScript - events17.linuxfoundation.orgevents17.linuxfoundation.org/sites/events/files/slides/NodeJS_Powerpoint.pdf · What is the Internet of Things? (IoT) Physical objects with

Questionshttp://twitter.com/chalkers

http://vine.co/chalkers

http://forefront.io