+ All Categories
Home > Technology > Introduction to JavaScript Robotics

Introduction to JavaScript Robotics

Date post: 12-Apr-2017
Category:
Upload: suz-hinton
View: 68 times
Download: 7 times
Share this document with a friend
29
INTRO TO JAVASCRIPT ROBOTICS Suz Hinton @noopkat
Transcript
Page 1: Introduction to JavaScript Robotics

INTRO TO JAVASCRIPT ROBOTICS

Suz Hinton@noopkat

Page 2: Introduction to JavaScript Robotics

aka.ms/tiara

Page 3: Introduction to JavaScript Robotics

ABOUT ME

Technical Evangelist at Microsoft

Open source hardware author

Member of NodeJS Hardware Working Group

Page 4: Introduction to JavaScript Robotics
Page 5: Introduction to JavaScript Robotics
Page 6: Introduction to JavaScript Robotics
Page 7: Introduction to JavaScript Robotics
Page 8: Introduction to JavaScript Robotics

AGENDA

Microcontroller boards

Inputs and Outputs

NodeJS on-board

NodeJS off-board

NodeJS as an IoT

service

Resources

Page 9: Introduction to JavaScript Robotics

Q: WHAT ARE MOST ROBOTS MADE OF?

A: MICROCONTROLLERS

A: INPUTS AND OUTPUTS

Page 10: Introduction to JavaScript Robotics

MICROCONTROLLERS

Page 11: Introduction to JavaScript Robotics

Arduino Uno

Processor - ATMega328PSpeed: 8MHzMemory: 32KbLanguage: C++Price: $24.95 USD

Good for:Offline, simple projects

Gotchas:No built in internet, modules are available

Page 12: Introduction to JavaScript Robotics

Tessel 2

Processor - Mediatek MT7620nSpeed: 580MHzMemory: 32Gb flash, 64Mb RAMLanguage: NodeJS, RustPrice: $44.95 USDExtras: built in Wi-Fi, runs Linux

Good for:Online, processor intensive projects

Page 13: Introduction to JavaScript Robotics

ESP8266

Processor – 32bit Tensilica Xtensa LX106Speed: 80MHzMemory: 1MB FlashLanguage: Lua, C++Price: $5 USDExtras: built in Wi-Fi, TLS capable

Good for:Online, portable, low power projects

Gotchas:Hard to work with

Page 14: Introduction to JavaScript Robotics

INPUTS AND OUTPUTS

Page 15: Introduction to JavaScript Robotics

INPUTS

‘read only’

sensors

switches

data

Page 16: Introduction to JavaScript Robotics

INPUT EXAMPLES

light sensor

touch sensor

humidity

sensor

api response

Page 17: Introduction to JavaScript Robotics

OUTPUTS

‘write only’

state

data

movement

Page 18: Introduction to JavaScript Robotics

OUTPUT EXAMPLES

LED (light)

speaker

motor

data stream

Page 19: Introduction to JavaScript Robotics

TECHNIQUES

Page 20: Introduction to JavaScript Robotics

#1 : NODEJS ON BOARD

with the Tessel2

Page 21: Introduction to JavaScript Robotics

$ npm install –g t2-cli$ npm install ambient-attx4

var tessel = require('tessel');var ambientlib = require('ambient-attx4');

var ambient = ambientlib.use(tessel.port['A']);ambient.getLightLevel();ambient.getSoundLevel();

Page 22: Introduction to JavaScript Robotics

#2 : NODEJS OFF BOARD

with the Arduino Uno

Page 23: Introduction to JavaScript Robotics

$ npm install –g firmata-party$ firmata-party uno$ npm install johnny-five

var five = require(‘johnny-five’);var board = new five.Board();

board.on(‘ready’, function() { var led = new five.Led(13); led.blink(500);});

Page 24: Introduction to JavaScript Robotics

#3 : NODEJS AS AN IOT SERVICE

with the ESP8266

Page 25: Introduction to JavaScript Robotics

IOT TIARA

Page 26: Introduction to JavaScript Robotics

IoT TiaraESP8266‘brain’3D printed band + crystalsRGB LEDs for lighting

Connects to MQTT broker (Azure IoT Hub)NodeJS server sends commands via broker

aka.ms/tiara

Page 27: Introduction to JavaScript Robotics

Azure IoT Hub tiara

Azure Web App

Twitch chat IRC channel

Page 28: Introduction to JavaScript Robotics

Azure IoT Hub tiara

Azure Web App

colorpicker.html

Page 29: Introduction to JavaScript Robotics

RESOURCES

tessel.io

arduino.cc

adafruit.com

nodebots.io

johnny-five.io

microsoft.com/en-us/internet-of-things

github.com/noopkat/iot-tiara


Recommended