Skip to content
AWTRIX Flows
Submit flow
Stopwatch shown on an AWTRIX display
Fig. 1 Stopwatch, as Avemer runs it.

Stopwatch

A simple pixel-style stopwatch for AWTRIX 3 written in Berry.

Specifications
System AWTRIX NG Scripts
Firmware AWTRIX NG
Topic Miscellaneous
Built by Avemer
File WpHaPuZaAK3Z.ax · 2.5 KB
Icons
Published 9 Aug 2026 · updated 9 Aug 2026

FEATURES

  • Start / stop / reset using the Select button
  • Two display formats:
    HH:MM:SS
    MM:SS:CC — minutes, seconds and hundredths of a second
  • Customizable text color
  • Real-time hundredths display when using MM:SS:CC
  • Automatically centered on the display
  • Uses now_ms() for accurate elapsed-time measurement
  • Keeps the elapsed time when stopped
  • Works swiftly, at 40 fps
    SETTINGS
    All user settings are located near the top of the script.

Stopwatch color
self.STOPWATCH_COLOR = 0xFFFFFF
The color uses the 0xRRGGBB format.
Examples:
0xFFFFFF = White
0xFF0000 = Red
0x00FF00 = Green
0x0000FF = Blue
0xFFFF00 = Yellow

Display format
self.STOPWATCH_FORMAT = 0
Available formats:

  • 0 = HH:MM:SS

  • 1 = MM:SS:CC
    Example:
    00:05:32

  • Format 0 displays hours, minutes and seconds.

  • Format 1 displays minutes, seconds and hundredths of a second:
    05:32:47
    Here 47 means 47 hundredths of a second (0.47 s).

Controls
The Select button has three functions depending on the current state.

  • Start = When the stopwatch is reset, pressing Select starts it.
  • Stop = When the stopwatch is running, pressing Select stops it and saves the elapsed time.
  • Reset = When the stopwatch is stopped, pressing Select resets the elapsed time to zero.
  • After resetting, pressing Select starts the stopwatch again.
    P.S. I have no idea how to extend the control of the stopwatch, since my Ulanzi TC001 watch only allows me to set it up like this. I did not find an option to add a continue button. Because it is not possible for me to receive a signal, for example, by pressing the Select button for a long time and it is not possible to assign a reset in this way. Therefore, now there is an opportunity to just start, pause and reset by pressing the Select button.

Accuracy
The stopwatch calculates elapsed time using:
now_ms()
The display in MM:SS:CC mode shows hundredths of a second (00–99).
The internal timer still works with milliseconds; only the displayed value is converted to hundredths.

Display
The current value is automatically centered horizontally using:
text_ink_width(value)
This allows both display formats to remain centered despite having different widths.

GENERAL
The code contains explanations if you want to change something.

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.