CloudPebble web IDE: write, build, and run Pebble watchfaces in your browser

CloudPebble Saved
JSwatchface.js

Tab indent Ctrl / comment EscTab leave

Tab inserts two spaces. Press Escape, then Tab, to move focus out of the editor. Control S builds, Control Enter builds and runs.

Ln 1, Col 1 0 lines Spaces: 2 JavaScript Not built yet

Emulator

Idle Time 2 ยท 200x228
ReadyPress Run

up, down Enter select Esc back

Like it? Wear it on a real Pebble

How it works

Write it. Run it. Wear it.

A sketchpad for watchfaces with no install, no account, and nothing to configure. Open the page and your first face is already ticking.

01

Write

A proper code editor: syntax colors, brackets that close themselves, auto-indent, comment toggling, bracket matching, and autosave to this browser.

02

Build

The build service checks your face the way the watch would: a missing draw(), unbalanced braces, APIs the wrist does not have. Errors land on the exact line, warnings glow amber.

03

Run

The emulator runs your code at native resolution, 200x228 for Pebble Time 2 and 260x260 for Round 2, snapped to 64 e-paper colors. Press a side button and it answers.

  • Locked sandboxCode runs in an isolated frame with no access to this page, your cookies, or the network helpers.
  • WatchdogA loop that never ends gets stopped after 1.5 seconds, and the console tells you where it was stuck.
  • AutosaveEvery keystroke is kept in this browser. Close the tab, come back tomorrow, keep going.
  • Share linksThe code rides inside the link itself, so a friend gets their own copy with one click.

Starters

Seven faces, ready to fork.

Each one is written against the same four hooks, so reading them is the fastest way to learn the API. Open one, break it, make it yours.

The whole API

It fits on a postcard.

Four hooks, two helpers, one canvas. If you have ever drawn a rectangle in a browser, you already know most of it.

  • draw paints the screen, every second or up to 30 times a second.
  • update keeps your math apart from your pixels.
  • onButton hears the four physical buttons.
  • vibrate and backlight talk to the hardware.
const fps = 1;                  // 1 to 30 redraws per second

function update(time) {         // state math, before each frame
}

function draw(ctx, w, h, time) {   // 200x228 or 260x260
  ctx.fillStyle = ROUND ? "#ff5500" : "#000000";
  ctx.fillRect(0, 0, w, h);
}

function onButton(name) {       // "up" "select" "down" "back"
  if (name === "select") vibrate("short");
  if (name === "up") backlight();
}

Hardware

Your code deserves a wrist.

Everything you run here was sized for these two screens. Physical buttons, always-on e-paper, and batteries measured in weeks.

Shipping now

Pebble Time 2

1.5" 64-color e-paper touchscreen at 200x228, up to 30 days per charge, heart rate, and four physical buttons.

$225

Details
Shipping now

Pebble Round 2

Color e-paper across the whole face at 260x260, 8.1 mm thin, about two weeks per charge, buttons plus touch.

$199

Details

Compare every Pebble