Write
A proper code editor: syntax colors, brackets that close themselves, auto-indent, comment toggling, bracket matching, and autosave to this browser.
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.
Emulator
Idle Time 2 ยท 200x228↑↓ up, down →Enter select ←Esc back
Like it? Wear it on a real PebbleHow it works
A sketchpad for watchfaces with no install, no account, and nothing to configure. Open the page and your first face is already ticking.
A proper code editor: syntax colors, brackets that close themselves, auto-indent, comment toggling, bracket matching, and autosave to this browser.
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.
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.
Starters
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
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
Everything you run here was sized for these two screens. Physical buttons, always-on e-paper, and batteries measured in weeks.
1.5" 64-color e-paper touchscreen at 200x228, up to 30 days per charge, heart rate, and four physical buttons.
$225
Color e-paper across the whole face at 260x260, 8.1 mm thin, about two weeks per charge, buttons plus touch.
$199