joeycastillo / Sensor-Watch

A board replacement for the classic Casio F-91W wristwatch
Other
1.02k stars 210 forks source link

Balanced nonary clock face #347

Open wryun opened 6 months ago

wryun commented 6 months ago

WARNING: this includes a commit from https://github.com/joeycastillo/Sensor-Watch/pull/346, so, err, ignore any watch_private_display. things. The actual changes are all in nonary_clock_face.

What's the point of having a customisable wrist watch unless you have bizarre timing schemes?

This maintains the normal concept of hours, but divides each hour into 9 * 9 * 9 * 9 seconds, so that we can display the time in nonary.

But not just nonary, this is balanced nonary, such that our digit values are -4, -3, -2, -1, 0, 1, 2, 3, 4

See: https://en.wikipedia.org/wiki/Balanced_ternary for more info on balanced number systems.

Midday is therefore 00:00:00. An example of counting before midday and after:

00:00:0(-4) 00:00:0(-3) 00:00:0(-2) 00:00:0(-1) 00:00:00 00:00:01 00:00:02 00:00:03 00:00:04 00:00:1(-4) 00:00:1(-3) 00:00:1(-2) 00:00:1(-1) 00:00:10 00:00:11 etc.

This has the advantage that you can always see what hour/minute you're closer to.

But wait - how can we display the negative digits? Well, to do this we use the top 'bar' in a digit as the negative sign, and for those numbers compress them into the bottom 4 segments, and then simply use the number of other segments filled as the digit. So, counting from -4 to 4:

 __   __  __  __  __
 __   __         |  |       __   __   __|
|__|, __|,__|,__,|__|,   |,   |,|  |,|  |

Sadly, because the top and the bottom segments are tied, we can't easily use the same digit for positive and negative values without running into 'normal' numbers in confusing ways.