Controlling the PHYSICAL WEB with WEB APPLICATIONS

Alex Miller (@lokithor23) 


Mozfest 2013

Why?

Number of connected devices
  • 2013 - 8.7 Billion
  • 2020 - 50 Billion
There are already more connected devices than the number of people on the planet.

But what about things?

The internet of things is all about using the internet to connect not just people but anything.

What things could we connect

Cars
Cows
Rivers
Chairs
Houses
Toasters
Tomatoes
Nanobots
Volcanoes
Streetlights
...
Almost anything!

But how can we talk to these Things?

Once things are connected to the internet we need to be able to communicate with them?

We already have a solution!

 APIs

Software on devices can be optimized for functionality and the interfaces on the internet can be designed for usability.

Using THE WEB to CONTROL AN ARDUINO

Today we are going to use an external API to connect to an Arduino.

We are going to do this using  Johnny Five

Johnny Five

Johnny-Five is an Open Source, JavaScript Arduino programming framework.


It is developed by Bocoup and the idea was to use JS to control robots and other electronics through the Arduino Firmata.


But all this comes from an article written 3 years ago:

NodeBots: the Rise of JS Robotics

www.voodootikigod.com/nodebots-the-rise-of-js-robotics/

JS ROBOTS

This presented the idea of using JS to control the world around us with a simple example from the JS Conference. 

$("livingroom").bind("motion", function() {
  $(this).find("lights").brightness("75%").dimAfter("120s");
}); 

$(this) = awesome;

Why JAVASCRIPT?

As web developers Javascript is one of the languages we use daily.

So we were very excited to see how simple it was to control an Arduino using this.

With platforms like node.js designed for server side Javascript, we can write a whole application for handling the logic and the outputs to an Arduino.

THE Cuckoo QUAcK

In August 2013 I attended a company hack weekend and decided that building a notification system that could communicate with any API would be a cool project.

In 24 hours we were able to take a cuckoo clock, 2 arduinos and a Raspberry Pi; and built a system that could be programmed to accept any API.



Let's Do THIS


Now we are going to set up an Arduino and Johnny Five to create a Nodebot that will blink out morse code based on the latest tweet for a hashtag.

We'll start by going to mozfest.cyberduck.net

dashtag

By Alex Miller

dashtag

Mozfest Dashtag

  • 1,863