Skip to content
AWTRIX Flows
Submit flow
Clock_S - Customizable Pixel Clock shown on an AWTRIX display
Fig. 1 Clock_S - Customizable Pixel Clock, as Avemer runs it.

Clock_S - Customizable Pixel Clock

Small centered clock HH:MM or HH:MM:SS with customizable color and blinking colon

Specifications
System AWTRIX NG Scripts
Firmware AWTRIX NG
Topic Miscellaneous
Built by Avemer
File FeQ2kYpQoh5l.ax · 5.6 KB
Icons
Published 9 Aug 2026 · updated 19 Aug 2026
Downloads 35

Inspired by the work of RobG.

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

Update 1.3 19 AUG

  • Added configurable 12/24-hour time format.
  • Added optional AM/PM indicator for 12-hour 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.

Changed:

  • Clock settings are now can be changed in a config section.
  • Night Mode now 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 the clock's appearance and behavior.

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. — set brightness modes and values.
  • 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 is shown when Night Mode starts and normal app rotation resumes when Night Mode ends.
  • Midnight-Crossing Schedule — Night Mode supports periods such as 23:00 → 08:00.

New Settings:

  1. NIGHT_MODE_ENABLED =
    NIGHT_MODE_ENABLED = 1 — Night Mode enabled
    NIGHT_MODE_ENABLED = 0 — Night Mode disabled

  2. NIGHT_START Night Mode start time Format: HH:MM

  3. NIGHT_END Night Mode end time Format: HH:MM

  4. NIGHT_CLOCK_COLOR Clock color used during Night Mode Format: 0xRRGGBB

  5. NIGHT_ROTATION_ENABLED =
    NIGHT_ROTATION_ENABLED = 1 — Disable app rotation during Night Mode
    Clock_M stays on screen
    NIGHT_ROTATION_ENABLED = 0 — Keep normal app rotation
    Only the night color changes

  6. Brightness
    If you're adding the brightness settings in this version as discussed, I'd describe them as:
    NIGHT_BRIGHTNESS
    Brightness used during Night Mode Range: 0–255
    DAY_BRIGHTNESS
    Brightness used during normal/day mode Range: 1–255

  • This follows the same general AWTRIX approach of controlling custom-app display behavior through the device's settings/API.

Example configuration
NIGHT_MODE_ENABLED = 1
NIGHT_START = "23:00"
NIGHT_END = "08:00"
NIGHT_CLOCK_COLOR = 0xFF0000
NIGHT_BRIGHTNESS = 1
DAY_BRIGHTNESS = 127
NIGHT_ROTATION_ENABLED = 1

Update 1.1 The settings menu has been moved up in the code.

FEATURES

  • Medium 3×5 pixel digits
  • 24 HH time format
  • Centered on the 32×8 AWTRIX display
  • Customizable clock color
  • The ability to turn on and off the seconds display
  • Optional blinking colon
  • Colon blinks once per second when enabled
  • Designed specifically for AWTRIX 3 Berry scripting

SETTINGS
In code look for section ====== START OF USER SETTINGS ======

1. BLINK_COLON
Controls whether the : blinks.
self.BLINK_COLON = 1
1 = colon blinks once per second
0 = colon stays permanently visible

2. CLOCK_COLOR
Controls the color of the clock.
The color is specified as a hexadecimal RGB value:
self.CLOCK_COLOR = 0xFFFFFF
Examples:
0xFFFFFF # White
0xFF0000 # Red
0x00FF00 # Green
0x0000FF # Blue
0xFFFF00 # Yellow
0x00FFFF # Cyan
0xFF00FF # Magenta

3. SHOW_SECONDS = 0
1 = show seconds
0 = hide seconds
You only need to change these settings; the rest of the script can remain unchanged.

Display
The clock displays the current time using large custom pixel digits:
HH:MM:SS
The script uses the AWTRIX draw() loop, so the display updates automatically.

GENERAL
The code contains explanations if you want to change something, such as the text position.

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

More flows for AWTRIX NG Scripts or Miscellaneous

Something wrong with this flow? Report it.