explaingit

rwaldron/johnny-five

13,404JavaScriptAudience · developerComplexity · 3/5Setup · moderate

TLDR

A Node.js framework for programming robots and IoT devices using JavaScript, letting web developers control LEDs, motors, sensors, and displays on Arduino and other hardware boards without writing any C++.

Mindmap

mindmap
  root((repo))
    What it does
      Controls hardware
      JavaScript robotics
      IoT device programming
    Supported Hardware
      Arduino boards
      Raspberry Pi
      BeagleBone
    Components
      LEDs and motors
      Sensors and buttons
      Displays and servos
    Integration
      Express.js web server
      Socket.io real time
      IO Plugin system
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Control an Arduino's LED, servo, or motor from Node.js without writing any C++ or embedded firmware.

USE CASE 2

Build a browser-controlled hardware project by combining Johnny-Five with Express.js and Socket.io.

USE CASE 3

Prototype IoT sensor projects on Raspberry Pi or BeagleBone using the same JavaScript API as on Arduino.

USE CASE 4

Create a game controller for physical hardware by pairing Johnny-Five with a Bluetooth controller library.

Tech stack

JavaScriptNode.jsArduinoFirmata

Getting it running

Difficulty · moderate Time to first run · 30min

Arduino boards need a one-time Firmata sketch uploaded via the Arduino IDE before Node.js can control them.

In plain English

Johnny-Five is a JavaScript framework for programming robots and IoT (Internet of Things) devices. It lets developers write Node.js code to control physical hardware like LEDs, motors, sensors, and displays, using the same JavaScript they might already know from web development. The framework uses a protocol called Firmata to talk to the hardware. For Arduino boards, the setup involves uploading a Firmata sketch through the Arduino IDE once, and from that point forward your JavaScript code communicates with the board over USB without needing any C++ or low-level embedded code. A list of IO Plugins handles non-Arduino platforms like Raspberry Pi, BeagleBone, Intel Edison, and Tessel 2, so the same Johnny-Five API works across a wide range of devices. The classic starting example blinks an LED on and off every half second in about five lines of code. From there the library provides APIs for servos, DC motors, sensors, buttons, accelerometers, temperature sensors, LCDs, piezo buzzers, and many other components. The project website at johnny-five.io has the full API reference, a large set of example programs, and wiring diagrams. Johnny-Five was designed to serve as a base layer rather than a complete solution. It pairs with other JavaScript libraries: web servers like Express.js, real-time frameworks like Socket.io, Bluetooth game controllers, and drone control libraries. That composition model lets you build web-connected or browser-controlled hardware projects using tools from the existing Node.js ecosystem. Installation is a single npm command. The full README is longer than what was shown.

Copy-paste prompts

Prompt 1
Show me how to use Johnny-Five to blink an LED on an Arduino Uno every 500ms using Node.js.
Prompt 2
How do I read temperature sensor values with Johnny-Five and log them to the console every second?
Prompt 3
Write a Johnny-Five script that rotates a servo motor to a specific angle based on HTTP requests from an Express.js endpoint.
Prompt 4
How do I use Johnny-Five with a Raspberry Pi instead of Arduino, what IO Plugin do I need and how do I install it?
Prompt 5
Show me how to combine Johnny-Five with Socket.io to toggle an LED from a browser button click in real time.
Open on GitHub → Explain another repo

← rwaldron on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.