Skip to content

New Share your ideas with the AWTRIX community. Keep your creations together in your account.

Sign in

Which AWTRIX do you have? Choose it once and the Hub shows what runs on it.

ScriptAWTRIX NG

Clock_XL - Customizable Pixel Clock

On an AWTRIX display
Clock_XL - Customizable Pixel Clock shown on an AWTRIX display
Clock_XL - Customizable Pixel Clock · by Avemer

On your display

A large pixel-style HH clock for AWTRIX 3 with customizable color and blinking colon.

Which AWTRIX do you have? See below where it runs, or choose your device.
Topic
Miscellaneous
Includes
Script

Runs on

  • Runs on 32×8 (TC001 & DIY)
  • Runs on 52×16 (TC002)
  • Does not run on 32×8 with AWTRIX 3 (TC001 & DIY) Made for AWTRIX NG.

Choose your display in the next step.

Send to AWTRIX

Choose your AWTRIX

Clock_XL - Customizable Pixel ClockAWTRIX NG script

Install this script on your AWTRIX NG. Its icons and sounds are installed with it.

Your AWTRIX’s local address, for example 192.168.178.39 or awtrix.local.

The name shown in your AWTRIX script list. Use letters, digits, hyphens or underscores.

Connection & device login

Connect your phone or computer to the same network as your AWTRIX. Allow local network access if your browser asks.

Use the device’s IP address, without a page path such as /#/apps.

If your AWTRIX requires a login, the username and password fields will appear when you connect.

Sign in to the Hub to install scripts. Attached files are installed separately.

Is this your script?

If you created this script, open your saved edit link to add it to your account. You can then manage it whenever you sign in. Adding it to your account replaces the edit link.

Script description

Inspired by the work of RobG.

  • This script uses ideas and implementation approaches from RobG's original nightmode clock.

Update 1.3

  • Added configurable 12/24-hour time format.
  • Added configurable Night Mode with custom start and end times.
  • Added separate day/night clock colors.
  • Added separate day/night brightness settings.
  • Added separate day/night automatic brightness settings.
  • Added option to disable app rotation during Night Mode.
  • Added automatic handling of night periods that cross midnight (e.g. 23:00 → 08:00).
  • Added configurable settings through the AWTRIX app configuration interface.
  • Added support for true / false boolean configuration values.
  • Improved handling of the 12/24-hour format selection.

Changed:

  • Clock settings are now changed through the AWTRIX configuration section.
  • The hour format is selected through the configuration interface:
    • 24 — 24-hour format
    • 12 — 12-hour format
  • Night Mode automatically switches between day and night settings without interrupting the clock.
  • Night Mode remains active after midnight until the configured Night End time.
  • Improved configuration handling for clock appearance, brightness and rotation.
  • Boolean settings use standard true / false values.

Update 1.2

  • Added Night Mode — automatically switches the clock to a separate night configuration during the selected time range.
  • Configurable Night Schedule — set the start and end time of Night Mode using HH:MM.
  • Configurable Brightness — separate brightness and automatic-brightness settings for day and night.
  • Night Clock Color — choose a separate color for the clock during Night Mode.
  • Night Rotation Control — optionally disable app rotation during Night Mode so the clock stays on screen.
  • Automatic Rotation Handling — when Night Rotation is enabled, the clock stays visible during Night Mode and normal rotation resumes when Night Mode ends.
  • Midnight-Crossing Schedule — Night Mode supports periods such as 23:00 → 08:00.

New Settings:

  1. hour_format
    Select the clock format from the AWTRIX configuration menu.
    24 — 24-hour format
    Example: 13:45
    12 — 12-hour format
    Example: 01:45

  2. blink_colon
    Controls whether the : blinks.
    true — colon blinks once per second
    false — colon stays permanently visible

  3. NIGHT_MODE_ENABLED
    true — Night Mode enabled
    false — Night Mode disabled

  4. NIGHT_START
    Night Mode start time.
    Format: HH:MM
    Example:
    23:00

  5. NIGHT_END
    Night Mode end time.
    Format: HH:MM
    Example:
    08:00

  6. NIGHT_CLOCK_COLOR
    Clock color used during Night Mode.
    Format: RGB hexadecimal color.
    Example:
    #FF0000

  7. NIGHT_ROTATION_ENABLED
    true — disable app rotation during Night Mode
    Clock_XL stays on screen.
    false — keep normal app rotation
    Only the night appearance changes.

  8. Brightness
    NIGHT_BRIGHTNESS
    Brightness used during Night Mode.
    Range: 0–255
    DAY_BRIGHTNESS
    Brightness used during normal/day mode.
    Range: 1–255

  9. Automatic Brightness
    NIGHT_AUTO_BRIGHTNESS
    true — automatic brightness during Night Mode
    false — fixed Night brightness
    DAY_AUTO_BRIGHTNESS
    true — automatic brightness during normal/day mode
    false — fixed Day brightness

Example configuration
hour_format = 24
blink_colon = true
NIGHT_MODE_ENABLED = true
NIGHT_START = "23:00"
NIGHT_END = "08:00"
NIGHT_CLOCK_COLOR = #FF0000
NIGHT_BRIGHTNESS = 1
DAY_BRIGHTNESS = 127
NIGHT_ROTATION_ENABLED = true

FEATURES

  • Large 6×7 pixel digits
  • Configurable 12/24-hour time format
  • Centered on the 32×8 AWTRIX display
  • Customizable day clock color
  • Customizable night clock color
  • Optional blinking colon
  • Colon blinks once per second when enabled
  • Configurable Night Mode schedule
  • Separate day/night brightness
  • Separate day/night automatic brightness
  • Optional disabling of app rotation during Night Mode
  • Supports Night Mode periods crossing midnight
  • Configurable through the AWTRIX app configuration interface
  • Designed specifically for AWTRIX 3 Berry scripting

Display
The clock displays the current time using large custom pixel digits:
HH:MM
Example in 24-hour mode:
13:45
Example in 12-hour mode:
01:45
The clock does not display seconds or an AM/PM indicator.
The script uses the AWTRIX draw() loop, so the displayed time updates automatically.

GENERAL

  • The code contains explanations if you want to change something.
  • The design of each digit and colon is written in the code and can be changed manually.
  • Configuration values are exposed through the AWTRIX app configuration interface.
  • hour_format is handled as a string because it is a select configuration value.
  • Boolean settings such as blink_colon, night_mode and night_rotation use true / false.

Vibecoded with ChatGPT, polished by Avemer.
And I'm a newbie, hope someone might find this script useful!

More scripts in Miscellaneous

Something wrong with this script? Report it.