Posts | Comments

Planet Arduino

Archive for the ‘PubNub’ Category

In this video, our friends at PubNub are going to create a smart home network that builds upon their previous Johnny Five tutorial. They again hack an Arduino Uno using JavaScript, but this time to create the simplest smart bulb. Because by “smart bulb,” we really just mean an LED.

The tutorial was developed by Tomomi Imura from PubNub and also uses Johnny-Five. No, not the robot from the movie Short Circuit. It is an open-source JavaScript robotics framework that lets you program an Arduino with Node.js. The bulb itself is remotely controlled via a web portal.

To establish the realtime communication between the Arduino and a web browser, the PubNub Data Stream Network (DSN) is used. PubNub provides global infrastructure and allows you to build and scale real-time apps and IoT devices quite easily.

The remote controller (web app) is written in JavaScript. This is a simple user interface that includes only one button. While a completed code sample is available on CodePen, this tutorial employs a simplified version so that it’s easier to follow along.

 

Interested in the world of hardware hacking, but feeling left out because you just don’t have the time to learn another language? Or maybe you aren’t comfortable using Sketch to program? Have no fear, you can easily use JavaScript to program boards like Arduino and Genuino. Yes, just JavaScript!

In this series of video, PubNub’s Tomomi Imura shows you how to start hacking an Arduino with Node.js using Johnny-Five, a JavaScript Robotics Framework.

Part one of this tutorial covers:

  1. Setting up a board.
  2. Building the Hello World of hardware, a LED blink.
  3. Writing your Johnny-Five code to make it blink programmatically.

Enjoy the tutorial!

 



  • Newsletter

    Sign up for the PlanetArduino Newsletter, which delivers the most popular articles via e-mail to your inbox every week. Just fill in the information below and submit.

  • Like Us on Facebook