node.js + Johnny-Five

Overview

Johhny-Five is a well-documented javascript library that leverages Arduino’s StandardFirmataPlus to allow for direct control of an Arduino, Raspberry Pi or other microcontroller straight forward and accessible. In this tutorial will walk through how to use it to control a physical output via an Arduino Uno.

Materials

  1. Arduino Uno board
  2. Arduino IDE
  3. node.js
  4. Johnny-Five module (npm install --save johnny-five)

Setup

  1. Create and initialize a new directory for this node.js system
    1. mkdir j5_test
    2. cd j5_test
    3. npm init
  2. Install and save the Johnny-Five package
    1. npm install --save johnny-five
  3. Upload the StandardFirmataPlus firmware to your Arduino
    1. Open Arduino application and plug in your Arduino
    2. Open File>Examples>Firmata>StandardFirmataPlus
    3. Upload to your Arduino and close the Arduino application
  4. Use a text editor to open a new file and call it j5_test.js
  5. Copy and paste this code:

Twitter Example

Leave a Reply