SlideShare a Scribd company logo
HOW I GOT BACK
MY CODING MOJO!
Mark West
#iottechday
What	is	Mojo?
IoT Tech Day Coding Mojo slides.  Utrecht, April 2016
IoT Tech Day Coding Mojo slides.  Utrecht, April 2016
IoT Tech Day Coding Mojo slides.  Utrecht, April 2016
“Any	application	that	can	be	
written	in	JavaScript,	will	
eventually	be	written	in	
JavaScript”
James	Atwood	(founder,	 	stackoverflow.com)
IoT Tech Day Coding Mojo slides.  Utrecht, April 2016
IoT Tech Day Coding Mojo slides.  Utrecht, April 2016
NodeBot Rover
NodeBot Rover	Demo
https://vimeo.com/162426456
NodeBot Rover	Component	Overview
Hardware
Computer
Micro	
Controller
Camera
Chassis
Pan	&	Tilt
Software
Speech
Robot	
Control
Web	
Server
Integration
Other
The	Arduino Ecosystem
• MicroController platform.
• Many	different	Arduino
models.
• Open	Source	design.
• MicroControllers extensible	
via	“Shields”.
Putting	the Hardware	Together
IoT Tech Day Coding Mojo slides.  Utrecht, April 2016
IoT Tech Day Coding Mojo slides.  Utrecht, April 2016
IoT Tech Day Coding Mojo slides.  Utrecht, April 2016
Two Servos
for	Camera
Pan	&	Tilt
Servos wired
to	Arduino
Chassis
Raspberry PI	
In	Plastic Case
WIFI	Dongle
Raspberry PI	
Camera
Wired directly
to	the
Raspberry PI
Actuators
Sensors
Nervous System
Raspberry	PI	2Raspberry	PI	Cam
Arduberry Microcontroller Arduino Chassis Servo
Servo
Brain
NodeBot Rover	Hardware
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!
Actuators
Sensors
Nervous System
Raspberry	PI	2Raspberry	PI	Cam
Arduberry Microcontroller Arduino Chassis Servo
Servo
Brain
NodeBot Rover	Hardware
NodeBot Rover	Component	Overview
Hardware
Raspberry	
PI
Arduberry
(Arduino)
Pi	Cam
Zumo
Chassis
Servos
Software
Speech
Robot	
Control
Web	
Server
Integration
Other
Raspberry	PI	2
Arduberry
Servo
Software	Communication	across	
Hardware	Layers
Servo
Raspberry PI	 Chassis
JavaScriptPI Binary (Compiled C	/	C++)
The	NodeBots Movement
Source	:	nodebots.io
IoT Tech Day Coding Mojo slides.  Utrecht, April 2016
1. Maturity
2. Community
3. DSL
4. Portability
5. Open	Source
6. Node.js ecosystem
7. REPL
Benefits	of	using	Johnny-Five
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
});
});
Johnny-Five	REPL	Demo
https://vimeo.com/134953425
Arduberry
Servo
Bridging	the	gap	with	Firmata
Servo
Raspberry PI	 Chassis
Johnny-Five
(Firmata Client)
Std.	Firmata
(Firmata Server)
JavaScriptPI Binary (Compiled C	/	C++)
IoT Tech Day Coding Mojo slides.  Utrecht, April 2016
Getting	Started	with	Johnny-Five
1. Buy	an	Arduino Experimenters	Kit.
2. Follow	the	tutorials	at	http://node-ardx.org.
3. Visit	http://johnny-five.io for	more	
information	and	inspiration.
NodeBot Rover	Component	Overview
Hardware
Raspberry	
PI
Arduberry
(Arduino)
Pi	Cam
Zumo
Chassis
Servos
Software
Speech
Johnny-
Five
Web	
Server
Integration
Other
Speech	Recognition	Requirements
Need	to	have
• Quality	and	speed	of	
speech	recognition.
• Free,	no	restrictions.
• Software	based.
• JavaScript.
Nice	to	have
• Speech	to	text.
• One	stop	service.
• Battle	tested.
IoT Tech Day Coding Mojo slides.  Utrecht, April 2016
IoT Tech Day Coding Mojo slides.  Utrecht, April 2016
Web	Speech	
API
(limited	to	Google	Chrome)
Web	Speech	API	:	Configuration
Web	Speech	API	:	Events
Web	Speech	API	:	Control
Speech	Demo
See	https://vimeo.com/162426456 for	an	
example	of	the	speech	recognition	in	progress.
Button	press	and	release	connected	to	
Web	Speech	API	start and	stop Control	
methods.
Continuous	dictation	switched	on,	to	avoid	
cutting	commands	short.	
Interim	results	switched	on	– shown	in	
green	text	(final	results	in	white).
Each	set	of	results	checked	for	uniqueness	
to	avoid	sending	duplicate	commands	to	
the	Robot.
Web	Speech	API	:	
Robot
NodeBot Rover	Component	Overview
Hardware
Raspberry	
PI
Arduberry
(Arduino)
Pi	Cam
Zumo
Chassis
Servos
Software
HTML5
Speech
Johnny-
Five
Web	
Server
Integration
Other
IoT Tech Day Coding Mojo slides.  Utrecht, April 2016
Node.js
Express	Web	
Server
(17	lines	of	code)
NodeBot Rover	Component	Overview
Hardware
Raspberry	
PI
Arduberry
(Arduino)
Pi	Cam
Zumo
Chassis
Servos
Software
Speech
Johnny-
Five
Express
Integration
Other
Johnny-Five	
Process
Express	
Process
Raspberry PI	2
WE
Browser
HTTPS
NodeBot
Rover
Hardware
Firmata
Johnny-Five	
Process
Express	
Process
Raspberry PI	2
WE
Browser
HTTPS
NodeBot
Rover
Hardware
Firmata
MQTT
Message	Broker
MQTT
MQTT	over	
WebSockets
Commands
Acknowledgements
MQTT.js
Client
MQTT.js
Client
Why Add a	Message	Broker?
• Seperation of
concerns.
• Isolate main
components for	
easier testing.
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.
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.
MQTT.js (Node.js)	Client	Example
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.
MQTT	Over	WebSockets Demo
Demo	of	the	HiveMQ WebSocket Client
http://www.hivemq.com/demos/websocket-
client
NodeBot Rover	Component	Overview
Hardware
Raspberry	
PI
Arduberry
(Arduino)
Pi	Cam
Zumo
Chassis
Servos
Software
HTML5	
Speech
Johnny-
Five
Express
MQTT	&	
WebSocket
Other
Node.js Twitter Client
• Fully fledged Twitter Client:
– Asynchronous.
– Supports	REST	API	(read and	write)
– Supports	Streaming API	(eventsand	tweets).
• Requires developer credentials from	Twitter:
– Trivial	to	get hold	of.
Node.js Twitter	Client	REST	Example
Video	Streaming via	Motion
• Motion:	Software	Motion	Detector.
• Provides streaming video	with possibility to	create
snapshots.
• Good performance on the Raspberry PI.
• Potential side	project:	get Robot	to	follow moving objects?
IoT Tech Day Coding Mojo slides.  Utrecht, April 2016
NodeBot Rover	Component	Overview
Hardware
Raspberry	
PI
Arduberry
(Arduino)
Pi	Cam
Zumo
Chassis
Servos
Software
HTML5	
Speech
Johnny-
Five
Express
MQTT	&	
WebSocket
Twitter &
Motion
So	Did I	Get My	
Coding Mojo
Back?
IoT Tech Day Coding Mojo slides.  Utrecht, April 2016
Controlling	a	Parrot	Drone	with	
Motion	Detectors	and	JavaScript
https://vimeo.com/137264033
IoT Tech Day Coding Mojo slides.  Utrecht, April 2016
IoT Tech Day Coding Mojo slides.  Utrecht, April 2016
“please rate my talk in the offical
IoT Tech Day app”
@markawest

More Related Content

PDF
homebot from TADHack Japan
PDF
Windows 10 on Raspberry PI 2
PPTX
SP IoT Doorbell
PPT
Micro & mobile
PDF
Node on Guard
 
PDF
Scaling IoT: Telemetry, Command & Control, Analytics and the Cloud
PPTX
Arduino for developers by Steve Robinson
PPTX
Home automation with Ninja Blocks
homebot from TADHack Japan
Windows 10 on Raspberry PI 2
SP IoT Doorbell
Micro & mobile
Node on Guard
 
Scaling IoT: Telemetry, Command & Control, Analytics and the Cloud
Arduino for developers by Steve Robinson
Home automation with Ninja Blocks

Similar to IoT Tech Day Coding Mojo slides. Utrecht, April 2016 (20)

PDF
Coding Mojo : Node.js Meetup
PDF
JavaOne 2015 : How I Rediscovered My Coding Mojo by Building an IoT/Robotics ...
PDF
Master-Master Replication and Scaling of an Application Between Each of the I...
PDF
Using Java Script and COMPOSE to build cool IoT applications, SenZations 2015
PDF
Workshop: Arduino for makers - Strumenti SW per la prototipazione elettronica...
PPTX
Building a Raspberry Pi Robot with Dot NET 7, Blazor and SignalR - TechDays 2023
PPTX
Internet of things (IoT) with Azure
PDF
How To Electrocute Yourself using the Internet
PPTX
Selfie booth ppt
PPTX
Nodebots
PPTX
Alex lakatos state of mobile web
PDF
Taking The Cloud Native
PDF
node.js is made for IoT - node.hh 07/16, Hamburg by Michael Kuehne
PDF
Poster IOTROBOT vatsalnshah_ec_indusuniversity
PDF
Iot meets Serverless
KEY
Phonegap for Engineers
PDF
Internet of Things Conference - Bogor city
ODP
Presentatoion hwl marvin1
ODP
Hardware Libre - M.A.R.V.I.N. Robot Project
PDF
C# Powered Robots, C# Powered Mobile Apps
Coding Mojo : Node.js Meetup
JavaOne 2015 : How I Rediscovered My Coding Mojo by Building an IoT/Robotics ...
Master-Master Replication and Scaling of an Application Between Each of the I...
Using Java Script and COMPOSE to build cool IoT applications, SenZations 2015
Workshop: Arduino for makers - Strumenti SW per la prototipazione elettronica...
Building a Raspberry Pi Robot with Dot NET 7, Blazor and SignalR - TechDays 2023
Internet of things (IoT) with Azure
How To Electrocute Yourself using the Internet
Selfie booth ppt
Nodebots
Alex lakatos state of mobile web
Taking The Cloud Native
node.js is made for IoT - node.hh 07/16, Hamburg by Michael Kuehne
Poster IOTROBOT vatsalnshah_ec_indusuniversity
Iot meets Serverless
Phonegap for Engineers
Internet of Things Conference - Bogor city
Presentatoion hwl marvin1
Hardware Libre - M.A.R.V.I.N. Robot Project
C# Powered Robots, C# Powered Mobile Apps
Ad

More from Mark West (16)

PPTX
A Practical-ish Introduction to Data Science
PPTX
Explaining the new Java release and licensing models
PPTX
IoT Meetup Oslo - AI on Edge Devices
PPTX
GeeCon Prague 2018 - A Practical-ish Introduction to Data Science
PPTX
JavaZone 2018 - A Practical(ish) Introduction to Data Science
PPTX
NDC Oslo : A Practical Introduction to Data Science
PDF
Make Data Smart Again 2018 - Building a Smart Security Camera with Raspberry ...
PPTX
DevExperience 2018 : Building a Smart Security Camera with Raspberry Pi Zero,...
PPTX
GeeCON Prague : Building a Smart Security Camera with Raspberry Pi Zero, Java...
PPTX
JavaZone 2017 : Building a smart security camera with raspberry pi zero, java...
PPTX
GeeCon 2017 : Building a Smart Security Camera with Raspberry Pi Zero, Node.j...
PPTX
Riga Dev Days: Building a Smart Security Camera with Raspberry Pi Zero, Node....
PDF
IoT Tech Day Smart Camera slides. Utrecht, April 2017.
PPTX
NTNU Tech Talks : Smartening up a Pi Zero Security Camera with Amazon Web Ser...
PDF
JavaZone 2016 : MQTT and CoAP for the Java Developer
PPTX
JavaZone 2015 : NodeBots - JavaScript Powered Robots with Johnny-Five
A Practical-ish Introduction to Data Science
Explaining the new Java release and licensing models
IoT Meetup Oslo - AI on Edge Devices
GeeCon Prague 2018 - A Practical-ish Introduction to Data Science
JavaZone 2018 - A Practical(ish) Introduction to Data Science
NDC Oslo : A Practical Introduction to Data Science
Make Data Smart Again 2018 - Building a Smart Security Camera with Raspberry ...
DevExperience 2018 : Building a Smart Security Camera with Raspberry Pi Zero,...
GeeCON Prague : Building a Smart Security Camera with Raspberry Pi Zero, Java...
JavaZone 2017 : Building a smart security camera with raspberry pi zero, java...
GeeCon 2017 : Building a Smart Security Camera with Raspberry Pi Zero, Node.j...
Riga Dev Days: Building a Smart Security Camera with Raspberry Pi Zero, Node....
IoT Tech Day Smart Camera slides. Utrecht, April 2017.
NTNU Tech Talks : Smartening up a Pi Zero Security Camera with Amazon Web Ser...
JavaZone 2016 : MQTT and CoAP for the Java Developer
JavaZone 2015 : NodeBots - JavaScript Powered Robots with Johnny-Five
Ad

Recently uploaded (20)

PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
Programs and apps: productivity, graphics, security and other tools
PPT
Teaching material agriculture food technology
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Machine learning based COVID-19 study performance prediction
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Encapsulation theory and applications.pdf
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
cuic standard and advanced reporting.pdf
PPTX
Spectroscopy.pptx food analysis technology
PDF
Electronic commerce courselecture one. Pdf
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
KodekX | Application Modernization Development
Reach Out and Touch Someone: Haptics and Empathic Computing
Programs and apps: productivity, graphics, security and other tools
Teaching material agriculture food technology
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
The AUB Centre for AI in Media Proposal.docx
Machine learning based COVID-19 study performance prediction
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
sap open course for s4hana steps from ECC to s4
Encapsulation theory and applications.pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
cuic standard and advanced reporting.pdf
Spectroscopy.pptx food analysis technology
Electronic commerce courselecture one. Pdf
MIND Revenue Release Quarter 2 2025 Press Release
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
“AI and Expert System Decision Support & Business Intelligence Systems”
Mobile App Security Testing_ A Comprehensive Guide.pdf
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
KodekX | Application Modernization Development

IoT Tech Day Coding Mojo slides. Utrecht, April 2016