Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
J

johnny-five

> DevOps
Open source

JavaScript Robotics and IoT programming framework, developed at Bocoup.

13.4K stars0 likes5 views
WebsiteGitHub

About

JavaScript Robotics and IoT programming framework, developed at Bocoup.

Johnny-Five

The JavaScript Robotics Programming Framework

Artwork by Mike Sgier Johnny-Five is an Open Source, Firmata Protocol based, IoT and Robotics programming framework, developed by the Nodebots Community. Johnny-Five programs can be written for Arduino (all models), Electric Imp, Beagle Bone, Intel Galileo & Edison, Linino One, Pinoccio, pcDuino3, Raspberry Pi, Particle/Spark Core & Photon, Tessel 2, TI Launchpad and more!

Johnny-Five has grown from a passion project into a tool for inspiring learning and creativity for people of all ages, backgrounds, and from all across the world.

Just interested in learning and building awesome things? You might want to start with the official Johnny-Five website.

  • If you want to find the API documentation, that’s right here.
  • Need to figure out what platform to use for a project? We put that stuff here.
  • Need inspiration for your next NodeBot? Check out the examples.
  • Want to stay up-to-date with projects in the community? Check this out.
  • Need NodeBots community or Johnny-Five project updates and announcements? This is what you’re looking for.

Johnny-Five does not attempt to provide "all the things", but instead focuses on delivering robust, reality tested, highly composable APIs that behave consistently across all supported hardware platforms. Johnny-Five wants to be a baseline control kit for hardware projects, allowing you the freedom to build, grow and experiment with diverse JavaScript libraries of your own choice. Johnny-Five couples comfortably with:

  • Popular application libraries such as Express.js and Socket.io.
  • Fellow hardware projects like ar-drone, Aerogel and Spheron
  • Bluetooth game controllers like XBox Controller and DualShock
  • IoT frameworks, such as Octoblu

...And that's only a few of the many explorable possibilities. Check out these exciting projects: node-pulsesensor, footballbot-workshop-ui, nodebotui, dublin-disco, node-slot-car-bot, servo-calibrator, node-ardx, nodebot-workshop, phone-home, purple-unicorn, webduino, leapduino, lasercat-workshop, simplesense, five-redbot, robotnik, the-blender

Why JavaScript? NodeBots: The Rise of JavaScript Robotics

Hello Johnny

The ubiquitous "Hello World" program of the microcontroller and SoC world is "blink an LED". The following code demonstrates how this is done using the Johnny-Five framework.

javascript
const { Board, Led } = require("johnny-five");
const board = new Board();

board.on("ready", () => {
  // Create an Led on pin 13
  const led = new Led(13);
  // Blink every half second
  led.blink(500);
});

Note: Node will crash if you try to run johnny-five in the node REPL, but board instances will create their own contextual REPL. Put your script in a file.

Supported Hardware

Johnny-Five has been tested on a variety of Arduino-compatible Boards.

For non-Arduino based projects, a number of platform-specific IO Plugins are available. IO Plugins allow Johnny-Five code to communicate with any non-Arduino based hardware in whatever language that platforms speaks!

Documentation

Documentation for the Johnny-Five API can be found here and example programs here.

Guidance

Need help? Ask a question on the NodeBots Community Forum. If you just have a quick question or are interested in ongoing design discussions, join us in the Johnny-Five Gitter Chat.

For step-by-step examples, including an electronics primer, check out Arduino Experimenter's Guide for NodeJS by @AnnaGerber

Here is a list of prerequisites for Linux, OSX or Windows.

Check out the bluetooth guide if you want to remotely control your robot.

Setup and Assemble Arduino

  • Recommended Starting Kit: Sparkfun Inventor's Kit
  • Download Arduino IDE
  • Plug in your Arduino or Arduino compatible microcontroller via USB
  • Open the Arduino IDE, select: File > Examples > Firmata > StandardFirmataPlus
    • StandardFirmataPlus is available in Firmata v2.5.0 or greater
  • Click the "Upload" button.

If the upload was successful, the board is now prepared and you can close the Arduino IDE.

For non-Arduino projects, each IO Plugin's repo will provide its own platform specific setup instructions.

Hey you, here's Johnny!

Source Code:

bash
git clone git://github.com/rwaldron/johnny-five.git && cd johnny-five

npm install

npm package:

Install the module with:

bash
npm install johnny-five

Example Programs

To get you up and running quickly, we provide a variety of examples for using each Johnny-Five component. One thing we’re especially excited about is the extensive collection of Fritzing diagrams you’ll find throughout the site. A huge part of doing any Johnny-Five project is handling the actual hardware, and we’ve included these as part of the documentation because we realised that instructions on how to write code to control a servo are insufficient without instructions on how to connect a servo!

To interactively navigate the examples, visit the Johnny-Five examples page on the official website. If you want to link directly to the examples in this repo, you can use one of the following links.

There are presently 362 example programs with code and diagrams!

Board

  • Board - Basic Initialization
  • Board - Cleanup in 'exit' event
  • Board - Multiple in one program
  • Board - Specify Sampling Interval
  • Board - Specify port
  • Custom Data Properties
  • Pin
  • REPL

LED

  • LED
  • LED - Blink
  • LED - Demo sequence
  • LED - Fade
  • LED - Fade callback
  • LED - Fade with animation
  • LED - PCA9685
  • LED - Pulse
  • LED - Pulse with animation
  • LED - Slider
  • LED - Tessel Servo Module
  • LEDs - An array of LEDs
  • LEDs - Controlling an array of LEDs

LED: RGB

  • LED - RGB (Common Anode)
  • LED - RGB (Common Anode) PCA9685
  • LED - RGB Intensity
  • LED - Rainbow
  • LED - Rainbow BlinkM

LED: Digits & Matrix

  • LED - Digital Clock
  • LED - Digital Clock, Dual Displays
  • LED - Digital Clock, HT16K33
  • LED - Draw Matrix Characters Demo
  • LED - Enumerate Matrix Characters & Symbols
  • LED - Matrix
  • LED - Matrix Demo
  • LED - Matrix HT16K33
  • LED - Matrix HT16K33 16x8

Servo

  • Servo
  • Servo - Continuous
  • Servo - Drive
  • Servo - Multi-Turn
  • Servo - PCA9685
  • Servo - Prompt
  • Servo - Slider control
  • Servo - Tessel Servo Module
  • Servos - An array of servos

GPS

  • GPS - Adafruit Ultimate GPS Breakout
  • GPS - Default GPS
  • [GPS - Hardware Serial](https://github.com/rwaldron/johnny-five/blob/mai

Issues· 63 open

View all issuesOpen on GitHub
  • #1855

    What is the state of Johnny-Five in 2026?

    Updated Aug 17, 2026
  • #1854

    Proteus 8

    Updated Jun 12, 2025
  • #1852

    Request for cooperation in developing laser paper counter

    Updated Apr 8, 2025
  • #1841

    RaspberryPi issue

    Updated Mar 7, 2025
  • #1844

    LILYGO SIM7000G - Issue using PWM controlling a DC motor and a servo at the same time

    Updated Oct 8, 2024
  • #1843

    Arduino Mega Link Bork'd

    Updated Aug 27, 2024
  • #1807

    johnny-five not working

    Updated Aug 10, 2024
  • #1833

    Input pull-up doesn't work on expanders

    Updated Jun 1, 2024
  • #1789

    TypeError: serialport.list is not a function (board.js line 42)

    Updated May 3, 2024
  • #1842

    Intermittent Error Code 31 in GetOverlappedResult

    Updated Mar 7, 2024

> Tags

JavaScript1-wireadcarduinobeaglebone-black

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedOct 2, 2026
CategoryDevOps
PricingOpen source

> Related tools

D
Docker
容器化平台,标准化应用交付
G
GitHub Actions
GitHub 原生 CI/CD 工作流
N
Nginx
高性能 Web 服务器与反向代理