Esta página se muestra en inglés. Una traducción al español está en curso.
ScriptsJul 22, 2026·3 min de lectura

Johnny-Five — JavaScript Robotics and IoT Platform

An open-source JavaScript framework for programming Arduino, Raspberry Pi, and other IoT hardware using a consistent, event-driven API in Node.js.

Listo para agents

Instalación lista para agent

Este activo puede instalarse después de elegir el runtime, revisar el plan y ejecutar el comando correspondiente.

Native · 98/100Política: permitir
Superficie agent
Cualquier agent MCP/CLI
Tipo
Skill
Instalación
Single
Confianza
Confianza: Established
Entrada
Johnny-Five
Comando de instalación directa
npx -y tokrepo@latest install 1f97ab25-85cf-11f1-9bc6-00163e2b0d79 --target codex

Ejecutar después de confirmar el plan con dry-run.

Introduction

Johnny-Five is a JavaScript robotics and IoT programming framework that lets Node.js developers control hardware like servos, sensors, LEDs, and motors using a familiar event-driven API. It supports over 75 board types including Arduino, Raspberry Pi, Intel Edison, and BeagleBone, making it the go-to library for building hardware projects in JavaScript.

What Johnny-Five Does

  • Provides a hardware-abstraction layer for controlling pins, sensors, servos, motors, and displays from JavaScript
  • Supports 75+ board platforms via IO plugins (Firmata, Raspi-IO, BeagleBone-IO, and more)
  • Offers an event-driven API with component classes like Led, Servo, Sensor, Button, and LCD
  • Includes a REPL for live interaction with connected hardware during development
  • Enables rapid prototyping of robotics and IoT projects using npm and the Node.js ecosystem

Architecture Overview

Johnny-Five communicates with microcontrollers through IO plugins that implement a standardized interface. The default protocol is Firmata, which runs on the microcontroller and exposes pin control over serial. The framework maps physical components to JavaScript objects with intuitive methods and event emitters, running the logic in Node.js on the host machine while delegating low-level I/O to the board firmware.

Self-Hosting & Configuration

  • Install via npm: npm install johnny-five
  • For Arduino, flash StandardFirmata from the Arduino IDE first
  • For Raspberry Pi, install raspi-io: npm install raspi-io
  • No additional system dependencies beyond Node.js and a supported board
  • Configuration is code-driven; pass board and pin options directly in constructors

Key Features

  • Unified API across 75+ board types with swappable IO plugins
  • Rich component library: LED, Servo, Motor, Sensor, Accelerometer, GPS, LCD, Relay, and more
  • Built-in REPL for live debugging and experimentation with connected hardware
  • Composable multi-board support for controlling several devices in one script
  • Active community with extensive examples covering drones, robots, wearables, and home automation

Comparison with Similar Tools

  • Arduino IDE — C/C++ based, compiled to hardware; Johnny-Five uses JavaScript and runs logic on the host
  • MicroPython — runs Python directly on the microcontroller; Johnny-Five keeps logic in Node.js with lower memory constraints
  • Cylon.js — similar JS robotics framework but less actively maintained and smaller component library
  • Firmata.js — low-level Firmata protocol library; Johnny-Five adds high-level component abstractions on top
  • PlatformIO — full embedded IDE and build system; Johnny-Five focuses on rapid prototyping, not firmware compilation

FAQ

Q: Does Johnny-Five run JavaScript on the microcontroller? A: No. JavaScript runs in Node.js on the host computer. The microcontroller runs Firmata firmware and receives commands over serial or network.

Q: Which boards are supported out of the box? A: Arduino (via Firmata) works by default. Raspberry Pi, BeagleBone, Intel Edison, Tessel, and ESP8266 are supported through IO plugins.

Q: Can I use Johnny-Five for production IoT deployments? A: It is best suited for prototyping and education. For production, consider pairing it with process managers like PM2 and a message broker for reliability.

Q: How do I add support for a new board? A: Implement a custom IO plugin that conforms to the IO Plugin interface, then pass it to the Board constructor.

Sources

Discusión

Inicia sesión para unirte a la discusión.
Aún no hay comentarios. Sé el primero en compartir tus ideas.

Activos relacionados