Skip to content

Releases: clockspot/arduino-clock

Time for Wi-Fi and LEDs!

12 Mar 20:08
91c14f4
Compare
Choose a tag to compare

Operating instructions for v2.0.0

This is a big release, which integrates code from a sister project, arduino-ledclock.

It brings support for the Arduino Nano 33 IoT, which adds:

  • Web-based settings page (via Wi-Fi or own access point)
  • NTP synchronization (when connected to Wi-Fi)
  • Buttonless operation option using accelerometer for tilt control

It also supports a new display type, a MAX7219-based LED matrix, with room for more types in future.

To support this release, lots of maintenance changes were made, including:

  • Code modularized into .h/.cpp files (finally)
  • A fake RTC option, for when DS3231 is not equipped (which works surprisingly well)
  • Persistent storage "wrapper" to support both AVR EEPROM and SAMD flash
  • Sunrise/sunset "rounding error" fixed
  • Relay signal has been split into switch and pulse signals
  • Version number is displayed if Select held briefly at startup; EEPROM is not reset unless it is long-held at startup

Upgrading existing UNDB clocks to this version is not recommended yet – you may wish to stay on v1.9 and wait for v2.1. This release does not bring many benefits for the classic AVR Nano/nixie combo, other than the sunrise/sunset fix; indeed, it is slightly less functional, as tube cleaning and scrolling routines are temporarily deactivated. There are a number of other outstanding bugs and to-dos (see TODO.md), and this code is also not yet tested with a SAMD Nano driving a nixie display or an AVR Nano driving an LED matrix display.

Rotary encoder and new configs

08 Sep 00:21
4e58a5d
Compare
Choose a tag to compare

Operating instructions for v1.9.0

  • Support for rotary encoder is reintroduced, via Paul Stoffregen’s Encoder library.
    • Encoder test sketch is provided.
  • Configs have been updated to use #define instead of const to support conditional includes, so that (among other perks) libraries don’t have to be installed in the IDE if the functionality they support is disabled in config. Simplified configs are also provided for v8/v9.
  • Setting values can now loop (since rotary encoder is more of a PITA to use than I want to admit).
  • Bugfix: timer seconds can be set to >32. Damn those data type bugs!

Bugfixes

06 Sep 18:23
5b6151d
Compare
Choose a tag to compare

Operating instructions for v1.8.1

  • Fixed scrolling date display with enhancements to scroll handling code
  • Sunrise/sunset are skipped if latitude/longitude are not specified

Config functionality switches, bugfixes

21 Aug 02:53
5856a44
Compare
Choose a tag to compare

Operating instructions for v1.8.0

  • Config files have been updated to support finer-grained control over clock functionality
    • Date/alarm/timer/temp/test functions, date counter and sunrise/sunset, alarm autoskip and Fibonacci, chime, and night and away shutoff functionality can all be enabled/disabled individually
  • Added millis() drift buffer to change offset slowly (1ms per loop) and apply correction smoothly, to solve display glitches in timer/chrono. This should make it possible again to replace all millis() with ms() – I haven't bothered for button press timing etc., but did do so for signal, so signal will keep good time (stay in sync with seconds/chrono).
  • Bugfix: when timer ran out under runout mode 1, it would immediately switch to time of day if it had been running over an hour. Fixed to stay on timer display while signal is going.

New chronograph and signal features

15 Aug 21:51
54c0a2c
Compare
Choose a tag to compare

Operating instructions for v1.7.0

  • Timer/Chrono improvements
    • Timer is now Timer/Chrono, as it can now count up too!
    • Timer can now be set by the second, up to 100 hours; and chrono can count up to 100 hours.
    • Timer has new “runout options,“ which control what it does when it runs out: stop, restart (interval), or start chrono, with long or short signal.
    • Chrono displays hundredths of seconds (when under one hour, or under one minute on 4-tube displays).
      • To enable chrono to be both precise in the short term (given DS3231 doesn't do subseconds) and accurate in the long term (given millis() drifts badly), added calibration wrapper for millis() that applies an offset to correct the drift, continuously adjusted per DS3231 (to within ~±20ms at any given time). checkRTC can now perform certain actions – such as the above offset adjustment – only once per timed trigger, so the actions don't accidentally compound.
    • New controls: Up is start/stop; Down gives a lap time (running chrono), toggles runout option (running timer), or resets to 0 (stopped). Holding Select goes directly into setting the timer, which now prompts for hours/mins, then seconds. Variations apply for rotary control.
    • Timer/chrono now follows leading zero option.
    • Timer interval option is removed, since the runout option now covers this. Frees EEPROM loc 25.
  • Signals now have beeper pattern options!
    • Long single, short single, double, triple, quadruple, and cuckoo
    • Signals are now timed per millis() rather than a DS3231 counter so that it can be triggered at any arbitrary time, to support the updated chrono/timer and to indicate patterns while setting.
    • Timer “radio sleep” relay is no longer considered a signal (similar to soft switch) so it can happen independently of signal.
  • Various bugfixes.
  • Config file updates
    • Increased default timeoutSet to 300 seconds (from 120) to allow time to set the timer to the full 100 hours.

Alarm skip, sunrise/sunset, and more!

04 Jul 23:16
c84204a
Compare
Choose a tag to compare

Operating instructions for v1.6.0

  • New alarm skip feature silences the next alarm in advance. Automatic alarm skipping has been rewritten to work via this feature, so it can be unskipped as well.
  • Alarm is now silenced with two button presses, rather than a hold, which enables cancelling snooze as well.
  • New sunrise/sunset feature, per the new latitude/longitude/UTC offset controls (albeit with a known issue in the library causing times to be a few minutes out – see readme for details)
  • Calendar now incorporates day counter and sunrise/sunset (with a view toward displaying weather in future IoT clocks).
  • DST check/correction is rewritten to support sunrise/sunset, and a new persistent DST flag allows the clock to correct itself after the fact if it wasn't powered up at DST change time.
  • Day counter now repeats annually, and can count up or down to the anniversary (e.g. counting up from 12/31 gives day of year!).
  • Time setting mode doesn't take effect if you leave it without changing anything (i.e. if you enter it by mistake).
  • Hold-setting rate is now derived from the short/long hold durations, so the value changes by a full 10 before moving into high-velocity setting, to make long-range setting a bit easier by not changing the ones digit (and a bit faster!).
  • Software version is displayed at power-up.
  • Miscellaneous refactorings and bugfixes.
  • Tweaks to default configuration files for shorter alarm pulse and to disable velocity threshold for Adj pressing (this was really intended for rotary controls).

Function Preset and Bugfixes

27 Oct 21:28
Compare
Choose a tag to compare

Operating instructions for v1.5.2

To give the Alt button something to do when not switching radio/relay power (no switched relay or no soft power switch), it now controls a Function Preset feature.

  • Press Alt to switch between Time and the preset function
  • Hold Alt to set the current function as the preset
  • When viewing the preset function, the display will not automatically return to Time, so this can be used to make a function display indefinitely.

This release also fixes an issue when pressing a button to wake the display during an off period.

Anti-poisoning improvements

24 Oct 04:42
Compare
Choose a tag to compare

Anti-poisoning routine improvements:

  • Daily/hourly routine runs for 5 cycles (~10sec)
  • The routine will not be triggered during night/away mode
  • Daily trigger happens either at midnight or just before night mode if enabled (I thought it would work better with "warm" tubes)

LED and relay control

15 Oct 04:56
Compare
Choose a tag to compare

This release brings support for PWM control of the LED circuit (switching it to pin 9), and control of the relay now built into v8 (with some modification) and newer UNDBs (on pin 17/A3).

See operating instructions for this release version here.

Other changes include:

  • Hardware configuration is done in separate files now, to make it easier to maintain several clocks with differing configurations
  • Options menu has been divided into sections and renumbered with gaps, in hope of making it easier to understand and minimizing changes to the numbering in future
  • New options for temperature format (if enabled) and anti-poisoning frequency
  • A potential fix for the "frozen zeroes" bug, which I believe to have been caused by the anti-poisoning not accounting for millis() rolling over every 50 days
  • Various other improvements and bugfixes
  • A proper license has been applied (LPGL 2.1, determined largely by the use of Arduino libraries)
  • Because of this, I've had to remove the libraries added in v1.1.0 supporting rotary encoder functionality, as they had incompatible licenses. This functionality will be brought back later another way.

Bugfixes and polishing

12 Apr 04:49
Compare
Choose a tag to compare

Bugfixes and some polishing including:

  • Soft EEPROM init, so if vals are out of range (particularly when upgrading to a version with new menu options) they are set to the default
  • Date set gets blinks between values, to visually confirm the save (especially if month/date are the same, you couldn't tell if your button press did anything)
  • If fade is enabled, it only applies to function displays, not to setting menus or tube testing
  • Nonzero defaults for fade (5ms) and snooze (the traditionally weird 9 minutes)