Skip to main content

Overview

mcujs is a JavaScript runtime for microcontrollers, built for Raspberry Pi Pico and Pico 2 boards. It turns your board into a little drive and a REPL so you can drop in an index.js, reboot, and see results right away.

Why mcujs

  • JavaScript-first workflow on MCUs
  • Drag-and-drop scripts plus a REPL for fast iteration
  • Minimal runtime built on JerryScript
  • Modular design so the engine can be swapped later

What it ships with

  • A simple on-device drive for index.js
  • A REPL over USB serial for quick experiments
  • Core hardware APIs (GPIO, PWM, I2C, SPI, ADC, NeoPixel)
  • Works with boards that include onboard RGB LEDs
  • CommonJS-style modules with /lib/ resolution

If you are coming from Node or Bun

  • Your entry point is index.js instead of index.ts
  • require() works for modules and JSON
  • Use built-in modules like gpio and fs instead of npm packages
  • Most of the flow is file-and-REPL based, not a full package manager

Key terms