Close

How Do You Edit the Code?

A project log for Hack-Ready Alarm Clock

An alarm clock that encourages tinkering and modification. Targeted for kids, but fun for old hacks like myself.

deckeregoDeckerEgo 11/30/2014 at 02:220 Comments

A big question in my mind for a while was how you could easily allow people to edit the clock's main run routine. I didn't want to make editing the Python file containing the main event loop difficult - it should require no installation and be fairly apparent. I didn't want to have to teach kids to SSH into the console, as laudable a goal as that might be.

After looking at a few JavaScript code editors, I think I've settled on CodeMirror as a way to expose the main run routine in an HTML page, which can then be edited easily within a browser. This meant I had to convert the project to Bottle, and I'll need to build some elementary parts of the code editor. In the end there should be a web interface to upload audio, edit the main event loop and safely re-start the clock driver without fear of runtime or compile time crashes.

The hardware build itself is almost complete, so next up will be getting this clock IDE running.

Discussions