Skip to content

Latest commit

 

History

History

CLK-01

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

PHTS CLK-01

Hardware

Hosted on EasyEDA/phts/CLK-01.

PHTS CLK-01

Owner's manual

Available at: tsaryk.com/CLK-01/manual

Usage

Control

"CLOCK" mode

Single click on button "EFFECTS / GLITCHES" selects effects on flip time:

  1. None (immediately)
  2. Decay
  3. Loop through digits
  4. Loop through digits (reversed)
  5. Loop through cathodes (shortest distance)
  6. Loop through cathodes (at least 1 loop)
  7. Loop through cathodes (ping-pong)
  8. Train
  9. Rubber band

Holding button "EFFECTS / GLITCHES" toggles glitches on/off.

Single click on button "BKLIGHT / NIGHT M." selects backlight:

  1. Turned off
  2. Turned on (100%)
  3. Turned on (60%)
  4. Turned on (30%)
  5. Smooth flashing

Holding button "BKLIGHT / NIGHT M." toggles night mode:

  1. Disabled
  2. Enabled
  3. Nightlight mode

"TIME SET" mode

Single click on button "HOURS" increases hour value.

Single click on button "MINUTES" increases minute value.

To apply new time toggle "MODE" switch to "CLOCK" position.

Development

  1. Connect device to PC. Find and install USB-SERIAL CH340 driver to be able to use the device via a COM port.

  2. Open CLK-01.ino file in Arduino IDE or any other editor supported by Arduino. Set the following parameters:

    1. Board type: Arduino Nano
    2. Processor: ATmega 328P (Old Bootloader)
    3. Programmer: AVRISP mkII
    4. Port: corresponding port which was assigned to the device when connected
  3. Make your cool changes and upload the firmware to device

Settings

Name Values Description
BKLIGHT_BRIGHTNESS_NIGHT 0–255 Backlight brightness on nighttime
BKLIGHT_BRIGHTNESS 0–255 Backlight brightness on daytime
BKLIGHT_DELAY ms How long backlight flashing should wait between
BKLIGHT_MIN_BRIGHTNESS 0–255 Minimal backlight brightness (flashing mode)
BKLIGHT_PERIOD ms How fast backlight should blink (flashing mode)
BKLIGHT_STEPS How smooth backlight should be changed (flashing mode)
BURN_LOOP_DELAY ms How long to wait between "burn" loops
BURN_LOOPS How many loops to run "burn"
BURN_TIMES_PER_HOUR How many times need to burn indicators during an hour
CONFIRMATION_INTERVAL ms How fast control button press confirmation is blinking
DEBUG Boolean If enabled, prints debug messages into Serial port
DEBUG_EFFECTS Boolean If enabled, makes time changed every few seconds
DEBUG_STANDBY_ENABLED Boolean If enabled, makes STADBY mode always enabled
DOT_BRIGHTNESS_INTERVAL ms How fast dot brightness should change during blinking (smooth mode)
DOT_BRIGHTNESS_NIGHT 0–255 Dot brightness on nighttime
DOT_BRIGHTNESS 0–255 Dot brightness on daytime
DOT_INTERVAL ms How fast dot should blink
DOT_MODE How to blink - simple or smooth
DUTY_CYCLE 0–255 Generator duty cycle, affects total voltage which comes to indicators
GLITCH_MAX_INTERVAL seconds Interval between glitches picked randomly (max value)
GLITCH_MIN_INTERVAL seconds Interval between glitches picked randomly (min value)
INDICATOR_BRIGHTNESS_NIGHT 0–24 Indicator brightness on nighttime
INDICATOR_BRIGHTNESS 0–24 Indicator brightness on daytime
INITIAL_BKLIGHT_MODE BKLIGHT_OFF BKLIGHT_ON BKLIGHT_ON_60 BKLIGHT_ON_30 BKLIGHT_FLASH Initial Backlight mode on fresh device's start
INITIAL_EFFECTS_MODE EFFECT_NONE EFFECT_DECAY EFFECT_LOOP_DIGITS EFFECT_LOOP_DIGITS_REV EFFECT_LOOP_CATHODES EFFECT_LOOP_CATHODES_LONG EFFECT_PINGPONG_CATHODES EFFECT_TRAIN EFFECT_RUBBER Initial Effects mode on fresh device's start
INITIAL_GLITCHES_MODE GLITCHES_OFF GLITCHES_ON Initial Glitches mode on fresh device's start
INITIAL_NIGHT_MODE NIGHT_MODE_DISABLED NIGHT_MODE_ENABLED NIGHT_MODE_NIGHTLIGHT Initial Night mode on fresh device's start
MEMORY_CELL_FIRST_RUN Memory cell where to store "first run" flag
MEMORY_FLAG_FIRST_RUN Value of "first run" flag
MEMORY Whether enabled memory storage or not
MODE_SET_BLINK_INTERVAL ms How fast indicators blink during "Set" mode
MODE_SET_HOURS_HOLD_TIME ms How long need to hold button to start repeating
MODE_SET_HOURS_INTERVAL ms How fast values are changed while button is pressed
MODE_SET_MINS_HOLD_TIME ms How long need to hold button to start repeating
MODE_SET_MINS_INTERVAL ms How fast values are changed while button is pressed
NIGHT_END 0–23 Hour when night mode should end
NIGHT_START 0–23 Hour when night mode should start
STANDBY_KEEP_BKLIGHT Boolean Whether to keep backlight on or off during standby mode
STANDBY_KEEP_DOT Boolean Whether to keep dot on or off during standby mode
STANDBY_NIGHT_SLEEP Boolean Whether to make the device have completely no light during night when Night Mode is enabled
STANDBY_TIMEOUT seconds Time of inactivity to enter to standby mode
STANDBY_WAKEUP_ON_TIME_CHANGE Boolean Whether to wake up from standby when time changed on exact minutes (controlled by STANDBY_WAKEUP_ON_TIME_CHANGE_MINS)
STANDBY_WAKEUP_ON_TIME_CHANGE_MINS 1–60 Minutes when the device wakes up from standby mode. E.g. 10 means to wake up on :00, :10, :20, ...; 49 means to wake up on :00, :49; 60 means to wake up on :00; value 0 is forbidden.
STANDBY_WAKEUP_RANDOM Boolean Whether to wake up at random minutes several times (controlled by STANDBY_WAKEUP_RANDOM_TIMES)
STANDBY_WAKEUP_RANDOM_TIMES Number How many times per hour the device should wake up from standby mode at random minute
SYNC_RTC_INTERVAL minutes How frequent to sync time with RTC module

Override settings locally

Clone local_settings.h.example into local_settings.h and redefine variables.