Skip to content

Releases: clockspot/arduino-clock

Piezo, relay, or both... oh my!

11 Apr 05:11
d9a30ef
Compare
Choose a tag to compare

This release supports piezo output, relay output, or both, depending on available pins; and the relay can be set to pulse like the piezo, or switch like an appliance timer, depending on what's connected to it. These settings are listed with the other hardware configuration settings at the top of the code.

If both outputs are equipped, the options menu lets the end user choose which output to use for each function – for example, in a clock radio situation, the alarm can drive the piezo or switch the radio.

When the relay is in switch mode, there is also now an option (line 77) to enable a software power switch, to switch the relay manually – this way the clock can be used like a true appliance timer. Also perfect for retrofitting the type of clock radio where the clock module does all the switching.

The digit fade setting (option 5) is finally working too.

Add new date formats

23 Mar 03:03
Compare
Choose a tag to compare

Option 2 now offers m/d/w, d/m/w, m/d/y, d/m/y, and y/m/d.

Alarm, timer, DST, day/night-off, hourly strike, and more!

19 Mar 15:10
Compare
Choose a tag to compare

Alarm is finally implemented again, as well as snooze and silence-til-tomorrow, and options to limit it to the work week or weekends only (7), set the snooze length (8), and the signal pitch (9).

Countdown timer can be set by the minute, up to 18 hours, and remembers the previously used setting. There are options for "interval mode" (10) which will restart it when it runs out, and for the timer signal pitch (11).

Auto DST adjustment (per option 6). Currently supports US/CA, UK/EU, MX, NZ, AU, BZ.

Day-off and night-off modes, to save energy (?) and tube life, and preserve sleep, by dimming or shutting off the display (per options 14-21). When tubes are off, Select will turn them back on briefly.

An option for hourly strike (12) and the strike pitch (13). It will do a single beep, strike the hour, ship's bell, or the BBC pips. Won't sound during day-off or night-off.

Auto date display at :30 (per option 3).

Weekday display is fixed.

Anti-cathode-poisoning digit cycle, on startup and daily at "night end" time (option 16).

And there are some special changes to accommodate 4-tube displays: the options menu has been reconfigured to use only 4 tubes (displaying option number and its value separately); the timer displays min/sec in place of hr/min when under 1hr, and the alarm indicates on/off status by bright/dim display.

Day counter and thermometer (2018-02-04)

15 Mar 22:10
Compare
Choose a tag to compare

This version switches to NorthernWidget's DS3231 library.

The EEPROM locations of things have changed, so after upload to the clock it will require a re-initialization (hold down the main select button while powering up). This now also resets the RTC to 2018-01-01 00:00:00. The setting procedure is the same as before, but the code now defaults to pushbuttons instead of a rotary encoder.

It is also now easier to choose which functions to include on the clock (in the fnsEnabled array on line 37). Alarm and timer are currently excluded as they are still incomplete, but I have added two other new functions: a day counter, which shows the number of days until / since a target date (set the same way as the calendar); and a thermometer. The temperature reading is straight from the DS3231 and appears to be in celsius with two decimal places, and reads a bit higher than ambient (as I write this, my clock is in its case and reads 34º). It might still be useful with a calibration factor maybe.

Rotary controls (2017-12-18)

15 Mar 22:10
Compare
Choose a tag to compare

Implements a rotary encoder control via AdaEncoder and ooPinChangeInt libraries, to sample the encoder with pin change interrupts. It still misses an index here and there, but it's far better than previous efforts – and may be helped by hardware debounce and/or removing delays. And it doesn't affect communication with the RTC or select button(s) at all (the buttons are still sampled via the main loop for simple debounce protection).

Time, date, and setup menu (2017-11-18)

15 Mar 22:09
Compare
Choose a tag to compare

Time and date viewing and setting are implemented here, as well as the setup menu (though only the first 4 options have effect). The settings are stored in EEPROM – on first run, hold the Select button during startup, and it will write the defaults into EEPROM (every write to EEPROM is written to the serial console as well).

Very glad this works, but no idea whether this is ultimately a better approach than the original code, which was organized primarily by clock function (time, date, etc) whereas this is more of a "control first" approach, where the methods are for handling inputs, setting values, updating the display, etc. I think it makes sense when user experience patterns are shared across multiple functions... but there is a bit more overhead. Perhaps this is what happens when a web developer has a go at embedded programming!

Initial development release (2017-11-13)

15 Mar 22:08
Compare
Choose a tag to compare

A new codebase, as an indulgence/learning exercise for me. It retains a refactored version of the existing code's SN74141 control (itself borrowed from another source) but the rest is almost all new. Supports simple button-push counter and a blinking setup menu with three options, including a working dimmer function.