The TARTIS travels through an wiggly wormhole. Pressing a button or switch (except "Menu") will cause the TARTIS to dematerialize and rematerialize a moment later in a random spot. My daughter plans on using this as her primary alarm clock once I figure out how to replace the alarm siren with the Doctor Who theme song.
I had to rewrite the wormhole code a few times to get it fast enough render correctly. The GLCD.h drawing routines are way too slow instead the wormhole uses glcdDataWrite()s directly to draw everything.
To speed things up I also EXTERMINATEd all division and modulus operations. For example to separate the hour into a high digit and low digit:
Traditional
- Code: Select all
high_digit = hour/10;
low_digit = hour%10;
I found this to be much faster
- Code: Select all
high_digit = 0;
low_digit = hour;
while (low_digit >= 10) { // Count tens
high_digit++;
low_digit -= 10;
}
When you have as much motion as this clock does every clock cycle counts.

