Top Banner
N.A.P N.A.P Controlling the internet of things using wearable tech @conversionpoint /evilqubit
31

Controlling the internet of things using wearable tech - Design+Code Day; ArabNet Beirut 2015

Jul 18, 2015

Download

Devices & Hardware

ArabNet ME
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Controlling the internet of things using wearable tech - Design+Code Day; ArabNet Beirut 2015

N.A.PN.A.PControlling the internet of things using

wearable tech

@conversionpoint /evilqubit

Page 2: Controlling the internet of things using wearable tech - Design+Code Day; ArabNet Beirut 2015

http://slides.com/simontadros/deck/livehttp://slides.com/simontadros/deck/live

Page 3: Controlling the internet of things using wearable tech - Design+Code Day; ArabNet Beirut 2015

Mix And Mingle

Page 4: Controlling the internet of things using wearable tech - Design+Code Day; ArabNet Beirut 2015

The recipeHardware Stack

Arduino Uno

USB cable

Breadboard

RGB Led

Wires

Pebble watch

Android or ios smart phone

Page 5: Controlling the internet of things using wearable tech - Design+Code Day; ArabNet Beirut 2015

Introduction to Arduino UnoIntroduction to Arduino Uno

The Arduino Uno is a microcontroller board based on the ATmega328 (dat

asheet). It has 14 digital input/output pins (of which 6 can be used a

s PWM outputs), 6 analog inputs, a 16 MHz ceramic resonator, a USB con

nection, a power jack, an ICSP header, and a reset button. It contains

everything needed to support the microcontroller; simply connect it t

o a computer with a USB cable or power it with a AC-to-DC adapter or b

attery to get started.

Memory

The ATmega328 has 32 KB (with 0.5 KB used for the bootloader).It also

has 2 KB of SRAM and 1 KB of EEPROM (which can be read and written w

ith the EEPROM library).

Page 6: Controlling the internet of things using wearable tech - Design+Code Day; ArabNet Beirut 2015

UNOUNO

Page 7: Controlling the internet of things using wearable tech - Design+Code Day; ArabNet Beirut 2015

Enchant Your ArmorEnchant Your Armor

http://www.adafruit.com/product/170

Page 8: Controlling the internet of things using wearable tech - Design+Code Day; ArabNet Beirut 2015
Page 9: Controlling the internet of things using wearable tech - Design+Code Day; ArabNet Beirut 2015

Downloading Weapons

http://arduino.cc/en/Main/Software

Page 10: Controlling the internet of things using wearable tech - Design+Code Day; ArabNet Beirut 2015
Page 11: Controlling the internet of things using wearable tech - Design+Code Day; ArabNet Beirut 2015

Yet my religion is javascript Yet my religion is javascript

Jhonny-Five

Johnny-Five is an Open Source, Firmata Protocol

based, IoT and Robotics programming framework,

developed at Bocoup. Johnny-Five programs can

be written for Arduino (all models), Electric Imp,

Beagle Bone, Intel Galileo & Edison, Linino One,

Pinoccio, Raspberry Pi, Spark Core, TI Launchpad

and more!

https://github.com/rwaldron/johnny-five

Page 12: Controlling the internet of things using wearable tech - Design+Code Day; ArabNet Beirut 2015

Coding Mask On !

WARNINGWARNING

Page 13: Controlling the internet of things using wearable tech - Design+Code Day; ArabNet Beirut 2015

Configuration Configuration Download

Plug in your Arduino or Arduino compatible

microcontroller via USB

Open the Arduino IDE, select: File > Examples >

Firmata > StandardFirmata Click the "Upload"

button.

Arduino IDE

Page 14: Controlling the internet of things using wearable tech - Design+Code Day; ArabNet Beirut 2015

install node js brew install nodejs node -vnpm -v

install gitbrew install git

npm install johnny-five

install jhonny-five

Test Jhonny-five

var five = require("johnny-five"), // or "./lib/johnny-five" when running from the source board = new five.Board();

board.on("ready", function() {

// Create an Led on pin 13 and strobe it on/off // Optionally set the speed; defaults to 100ms (new five.Led(13)).strobe();

});

Page 15: Controlling the internet of things using wearable tech - Design+Code Day; ArabNet Beirut 2015

Lets start building Lets start building N.A.PN.A.P

Assembling the hardware

Page 16: Controlling the internet of things using wearable tech - Design+Code Day; ArabNet Beirut 2015

building building N.A.PN.A.PTest the RGB LED

var five = require("johnny-five");

five.Board().on("ready", function() {

// Initialize the RGB LED var led = new five.Led.RGB({ pins: { red: 3, green: 5, blue: 6 } }); // Add led to REPL (optional) this.repl.inject({ led: led });

// Turn it on and set the initial color led.on(); led.color("#FF0000"); led.blink(1000);});

Page 17: Controlling the internet of things using wearable tech - Design+Code Day; ArabNet Beirut 2015

building building N.A.PN.A.PApp architecture

arduino-twitter

app.jscontroller.jsconfig.jspackage.json

You can clone the repo at anytime

Git clone https://github.com/evilqubit/equilibrium- NAP1

NAP1/

Page 18: Controlling the internet of things using wearable tech - Design+Code Day; ArabNet Beirut 2015

... and it s only javascript

The force is strong with thisone

Page 19: Controlling the internet of things using wearable tech - Design+Code Day; ArabNet Beirut 2015

Another example ofAnother example ofpower power

Node present Web Sockets

Page 20: Controlling the internet of things using wearable tech - Design+Code Day; ArabNet Beirut 2015
Page 21: Controlling the internet of things using wearable tech - Design+Code Day; ArabNet Beirut 2015

Limit is the universe

Page 22: Controlling the internet of things using wearable tech - Design+Code Day; ArabNet Beirut 2015
Page 23: Controlling the internet of things using wearable tech - Design+Code Day; ArabNet Beirut 2015

Introduction to Pebble Introduction to Pebble Pebble is a smart watch, that connects via Bluetooth.

Page 24: Controlling the internet of things using wearable tech - Design+Code Day; ArabNet Beirut 2015

Developer Guide

1. The Pebble C SDK, used for creating native watchapps and watchfaces.

2. Objective-C library for creating companion apps that interface iOS and Pebble.

3. Java library for creating companion apps that interface Android and Pebble.

4. JavaScript component of a Pebble app that leverages features of the connected phone to

enhance watchapp capabilities.

5. Create watchapps using only JavaScript code, which controls a provided native watchapp over

Bluetooth.

Pebble C

PebbleKit iOS

PebbleKit Android

Pebblekit js

Pebble.js

Page 25: Controlling the internet of things using wearable tech - Design+Code Day; ArabNet Beirut 2015

Coding Mask On !

WARNINGWARNING

Page 26: Controlling the internet of things using wearable tech - Design+Code Day; ArabNet Beirut 2015

pebble new-project Tutorial1pebble buildpebble install --phone 192.168.1.78.

Deploy pebble app Deploy pebble app

Page 27: Controlling the internet of things using wearable tech - Design+Code Day; ArabNet Beirut 2015

Build A Watchapp with Pebble.jsBuild A Watchapp with Pebble.js

Page 28: Controlling the internet of things using wearable tech - Design+Code Day; ArabNet Beirut 2015

Cylon.Js

building building N.A.PN.A.P

Page 29: Controlling the internet of things using wearable tech - Design+Code Day; ArabNet Beirut 2015

CylonJs Pebble

Page 30: Controlling the internet of things using wearable tech - Design+Code Day; ArabNet Beirut 2015

May the source beMay the source bewith you with you

https://github.com/evilqubit/NAP

Page 31: Controlling the internet of things using wearable tech - Design+Code Day; ArabNet Beirut 2015

Final thoughts Final thoughts

“Technology isn’t what makes us “post-human” or “transhuman,” as some writersand scholars have recently suggested. It’s

what makes us human. Technology is in ournature. Through our tools we give our

dreams form. We bring them into the world.The practicality of technology may

distinguish it from art, but both spring froma similar, distinctly human yearning.” ―

Nicholas Carr, The Glass Cage: Automationand Us