kevin hoyt, "on the verge of genius: smart cities workshop"

76
On the Verge of Genius Exploring smart cities, agriculture, and health care.

Upload: webvisions

Post on 14-Jan-2017

288 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"

On the Verge of GeniusExploring smart cities, agriculture, and health care.

Page 2: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"

Crowdsourcing

Page 3: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"
Page 4: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"
Page 5: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"
Page 6: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"

CSSISAWESOME

Page 7: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"
Page 8: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"
Page 9: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"

BIAS

Page 10: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"
Page 11: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"

Overconfidence BiasOverconfidence Bias

Page 12: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"

NO

NO

NO

NO

NO

NO

NO

NO

NO

NO

NO

NO

NONO

NO

NO

NO

NO

NO

NO

NO

NO

NO

NO

NO

NONO

NO

NO

NO

NO

NO

NO

NO

Confirmation BiasConfirmation Bias

Page 13: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"

Loss-Aversion BiasLoss-Aversion Bias

Page 14: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"

Input BiasInput Bias

Page 15: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"
Page 16: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"

Default BiasDefault Bias

Page 17: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"
Page 18: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"
Page 19: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"
Page 20: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"

Smart CitiesSmart Cities

Page 21: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"
Page 22: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"
Page 23: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"
Page 24: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"
Page 25: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"
Page 26: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"
Page 27: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"

<geek>

Page 28: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"

● ATmega328 (16MHz)● Input voltage 7-15V● 14 digital IO pins● 6 pulse width modulation (PWM)● 6 analog inputs● 32k flash memory

Page 29: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"

long count = 0;

void setup() {

Serial.begin( 9600 );

}

void loop() {

count = count + 1;

Serial.println( count );

delay( 1000 );

}

Page 30: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"

Node.jsGet serial data from Arduino.

Page 31: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"

var serialport = require( 'serialport' );

var SerialPort = serialport.SerialPort;

var arduino = new SerialPort( '/dev/cu.usbserial-DA01L7G3', {

baudrate: 9600,

parser: serialport.parsers.readline( '\n' )

} );

arduino.on( 'data', function( data ) {

console.log( 'Count: ' + data );

} );

Page 32: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"

Watson IoTSend data to Watson IoT for distribution.

Page 33: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"

● Pioneered at IBM (1999)● ISO standard● OASIS specification● Publish-subscribe pattern● On top of TCP/IP● Broad adoption

○ Facebook Messenger○ Amazon Web Services○ Microsoft Azure○ IBM Bluemix (Waton IoT)

Publisher Publisher Publisher

Broker

Subscriber Subscriber Subscriber

Page 34: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"

// Node libraries

var jsonfile = require( 'jsonfile' );

var mqtt = require( 'mqtt' );

var serialport = require( 'serialport' );

var SerialPort = serialport.SerialPort;

Page 35: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"

// Watson IoT connection properties

var config = jsonfile.readFileSync( 'config.json' );

// Connect to Watson IoT broker

var client = mqtt.connect( config.host, {

clientId: config.client + Math.round( Math.random() * 1000 ),

password: config.password,

port: config.port,

username: config.user

} );

Page 36: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"

// Connect to Arduino

var arduino = new SerialPort( '/dev/cu.usbserial-DA01L7G3', {

baudrate: 9600,

parser: serialport.parsers.readline( '\n' )

} );

Page 37: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"

// Listen for data from the Arduino

// Send JSON-formatted data to Watson IoT

arduino.on( 'data', function( data ) {

console.log( 'Count: ' + data );

client.publish( config.topic, JSON.stringify( {

count: parseInt( data )

} ) );

} );

Page 38: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"

Browser (Client)Get Watson IoT data in a web page.

Page 39: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"

// Instantiate client

try {

client = new Paho.MQTT.Client(

IOT_HOST,

IOT_PORT,

IOT_CLIENT + Math.round( Math.random() * 1000 )

);

// Handle incoming messages

client.onMessageArrived = doCountArrived;

} catch( error ) {

console.log( 'Error: ' + error );

}

Page 40: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"

// Connect to Watson IoT

client.connect( {

userName: IOT_USER,

password: IOT_PASSWORD,

onSuccess: doClientConnect,

onFailure: doClientFailure

} );

Page 41: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"

// Subscribe for data once connected

function doClientConnect( context ) {

console.log( 'Connected.' );

client.subscribe( IOT_TOPIC );

}

// Unable to connect

function doClientFailure( context, code, message ) {

console.log( 'Connection fail.' );

}

Page 42: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"

// Message arrived

function doCountArrived( message ) {

var data = null;

var element = null;

// Parse JSON-formatted string

data = JSON.parse( message.payloadString );

console.log( data );

// Place on screen

element = document.querySelector( '.count' );

element.innerHTML = data.count;

}

Page 43: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"

● Humidity● Temperature● Barometric Pressure● Light levels● Wind speed● Wind direction● Rainfall

Page 44: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"

● 56 channel● 1-10Hz update rate● 29 second cold start● TTL connection (serial)

Page 45: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"

● Fix taken at 12:35:19 UTC● Latitude 48 deg 07.038' N● Longitude 11 deg 31.000' E● Fix quality: 1 = GPS fix● 8 satellites being tracked● 0.9 horizontal dilution of position● 545.4,M altitude in meters above mean sea level● 46.9,M height of mean sea level● (empty field) time in seconds since last update● (empty field) station ID number● *47 checksum data

$GPGGA,123519,4807.038,N,01131.000,E,1,08,0.9,545.4,M,46.9,M,,*47

Page 46: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"

● OBD-II version 2.1● Bluetooth connection (serial)● No batteries required● 5-10m range

Page 47: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"

atz // OBD protocol > ELM327 v1.3a

atrv // Vehicle voltage > 12.5V

atsp0 // Protocol level > OK

0100 // Current data > 41 00 BF 9F A8 93

010c // Engine RPM > 41 0C 0E 96

Page 49: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"

</geek>

Page 50: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"

9.6 billion people by 2050Food production must increase by

70% to meet demand.

Page 51: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"

9.6 billion people by 205070% of the world’s freshwater

supply is consumed by agriculture.

Page 52: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"

● Precision livestock farming

● GPS location of animal● Body temperature● Animal activity● Tissue resistivity● SMS when ready for

reproduction

Page 53: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"

● Linear mapping of 10km^2● Uses a parachute to land● 12 megapixel camera

(stabilized)● Fertilize only those areas

that need it

Page 54: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"

● The field is the new office● Data is the new fertilizer● From 900 acres to 5,000 acres● Two minutes for recommendations

Page 55: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"
Page 56: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"

<geek>

Page 57: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"

V+

V-

Time

Page 58: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"

On

Off Time

Page 59: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"

// Serial reporting

void setup() {

Serial.begin( 9600 );

}

void loop() {

int value = analogRead( A0 );

Serial.println( value );

// Wait a second

delay( 1000 );

}

Page 60: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"
Page 61: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"

On

Off Time

Page 62: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"

● Particulate matter level (PM)● Low Pulse Occupancy time (LPO)● 1um or larger● 5V input voltage● Grove compatible interface● Pulse Width Modulation (PWM)● 10k Ohm resistor for sensitivity

Page 63: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"

● Based on DB18B20● 3.3-5V input voltage● -55C to 125C range● +/-0.5C from -10C to 85C● 1 Wire interface● Waterproof● Requires 4.7k Ohm pull-down

Page 64: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"
Page 65: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"

● 0-14 pH range● 1 second response time● Laboratory grade

Page 66: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"
Page 67: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"

</geek>

Page 68: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"

SELF DIAGNOSIS WITH WEBMD.COM

Ailments before signing on Ailments after signing on

Slight cough and fever

Meningitis

Inflamed gallbladder

Oh no - Multiple myeloma

Aids - maybe?

Helicobacter pylori - I think

Page 69: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"

Complications from pollution include heart disease, stroke, and asthma.

Page 70: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"
Page 71: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"

<geek>

Page 73: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"

● Electromyography (EMG)● Muscle electrical activity● Wearable design● LED indicators● Two output modes

○ EMG envelope○ Raw EMG

Page 74: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"

● Heart rate monitor armband● Support for Garmin ANT+● Support for Bluetooth Smart● Submersible up to 1m● 8 hour rechargeable battery

Page 75: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"

</geek>

Page 76: Kevin Hoyt, "On the Verge of Genius: Smart Cities Workshop"