Apr 232013

A year ago Super Awesome Sylvia demoed MarioChron for the Adafruit MonoChron dekstop clock kit. It’s really neat — once per minute Mario hits the box and receives a coin, so his score is equal to the time. Now thanks to the GPL license on the code, you can carry it on your wrist with the port of MarioChron to the Pebble Smart Watch:
MarioChron, Pebble edition

You can install the prebuilt mario.pbw binary and the source is available for further hacking. Here’s a short video of Mario’s coin collecting action (the jump height has since been fixed in the source code).

The code is a straightforward port that reuses almost all of the original logic. The only change is to rearrange the screen slightly from the MonoChron’s 128×64 LCD to the Pebble’s 168×144. This involved translating the glcdClearDot() and glcdSetDot() calls to 2×2 rectangles using the Pebble’s graphics_fill_rect() functions. Unfortunately the e-paper display on the Pebble is designed for mostly static images, and updating it at 10 Hz for the animation draws far more power than a once-per-minute clock face. This means that this watch face consumes lots of power and the Pebble only lasts part of one day instead of an entire week. Perhaps optimizing the redraws instead of redrawing the entire screen would let it last longer.

Want to learn how to write your own watches for the Pebble? Sign up for the May 18 Pebble programming class at NYCR or come to the hackathon after!

 Posted by at 8:46 pm

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>