IoT Tech Day Coding Mojo slides. Utrecht, April 2016
•
1 like•974 views
http://www.iottechday.nl/sessions/how-i-rediscovered-my-coding-mojo-by-building-an-iotrobotics-prototype/
Includes links to video demos.
"Come hear the story of how I learned new technologies and rediscovered my coding mojo by building an IoT/robotics prototype: a JavaScript powered, voice-controlled robot! Along the way you can expect to learn about HTML5 speech recognition, controlling hardware with Node.js and Johnny-Five, using WebSockets and MQTT for communication between components, and finally how you can combine the Raspberry Pi and Arduino platforms to gain ultimate power over your own projects!"
1 of 65
Download to read offline
More Related Content
IoT Tech Day Coding Mojo slides. Utrecht, April 2016
1. HOW I GOT BACK
MY CODING MOJO!
Mark West
#iottechday
20. Combining the Raspberry PI & Arduino
Raspberry PI
• Linux PC.
• Supports USB peripherals.
• Programming.
ArduinoPlatform
• MicroController.
• Robust.
• Native analogue support.
The whole is greater than the sum of parts!
26. 1. Maturity
2. Community
3. DSL
4. Portability
5. Open Source
6. Node.js ecosystem
7. REPL
Benefits of using Johnny-Five
27. Imports J5 Dependancy
Adds LED instance to REPL
Declares LED as connected to UNO Pin 13
Blinks LED every 500 milliseconds
Code block triggered by UNO ”Ready” Event
Initialises UNO
Johnny-Five Code Example
var five = require("johnny-five");
var myBoard = new five.Board();
myBoard.on("ready", function() {
var myLed = new five.Led(13);
myLed.blink(500);
this.repl.inject({
replLed: myLed
});
});
49. MQTT – MQ Telemetry Transport
• Internet of Things connectivityprotocol.
• Designed to be lightweightwith a small footprint and little
overhead.
• Is a protocoland a Pub-Sub Message Broker.
• Used by Facebook for pushing updates to mobile clients.
50. Adding MQTT to the NodeBot Rover
Broker
• Public MQTT Broker
– ManyPublic Brokers exist.
– One less process to run on
RaspberryPI.
Client
• MQTT.js
– Provides an MQTT client
libraryfor Node.js.
– Extremelysimple to use.
– Integrates seamlesslywith
Johnny-Five.
52. MQTT Over WebSockets with MQTT.js
• MQTT.js is a Node.js package and is
meant for use on the Server Side.
• To allow MQTT.js to run from the
Browser, we first needed to
”Browserify” the MQTT library.
• We could then access the
”Browserified” MQTT client library
from the Browser.
• This solution requires that your MQTT
Broker has a WebSocket endpoint.