A small clock with OLED display

This clock is housed in an oak enclosure.
It is controlled by a wsduino board which has a built-in RTC. It has a 2x16 OLED display and is controlled by four push-buttons at the rear:I/O,RESET,24, and 12.


The clock runs on +8 to 14V DC, and uses 60 MA Using the AC adapter it consumes 2 watts.
When turned on, or RESET pressed, it goes into Normal Mode, which shows time, date, day of week and temperature.
In Normal Mode:
I/O toggles between showing the data, and a blank screen.
24 shows hour in military time,
12 shows hour in 12-hour time.

There is also a Settings mode. To go into Settings, press and hold I/O, then tap RESET. Keep holding I/O until Hour setting appears.
There are several Settings pages. Pressing I/O will cycle through them. In each 24 increases the value, and 12 decreases.
Seconds is different, it always goes to zero, enabling setting the clock to within a second.

To exit Settings, press RESET.

The clock is programmed as a DueMilleanove, via a FTDI adapter connected to the header underneath. Press the RESET button at the start of each upload.
The clock chip is a DS3231, which is very accurate. To keep time when unplugged, it uses a CR1220 3V battery, which should last years. Keep plugged in while changing it. To remove, pull lever out until the battery flips out. To insert tilt under tabs at inboard side, then push down..

These are the photos of the finished clock.

Here is the Arduino sketch.

Here are the circuit diagrams.