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.

FlowAWTRIX NG

[TC002] Pixel Aquarium

On an AWTRIX display
[TC002] Pixel Aquarium shown on an AWTRIX display
[TC002] Pixel Aquarium · by bNjtHub

On your display

Living 52x16 aquarium: press the knob to feed the fish, weeds sway, bubbles rise, and it dims and sleeps at night.

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

Runs on

  • Runs on Ulanzi TC001
  • Runs on Ulanzi TC002
  • Runs on ESP32 (DIY)
  • Runs on ESP32-S3 (DIY)
  • Does not run on Ulanzi TC001 with AWTRIX 3 Made for AWTRIX NG.

Choose your display in the next step.

Send to AWTRIX

Choose your AWTRIX

[TC002] Pixel AquariumAWTRIX 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 or hostname, 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.

Flow description

A living pixel aquarium for your clock: a goldfish, an angelfish and three colourful tetras swim around, weeds sway, bubbles rise from an air stone, a treasure chest opens now and then, and light rays drift across the water.

Press the knob to feed the fish. A few food pellets sink down, the fish race for them and burp a bubble when they eat. Pellets left on the sand disappear after 8 seconds.

At night the tank dims and the fish doze near the sand, with a little "z" floating up.

Built for the Ulanzi TC002 (52x16 panel). The script reads width() / height(), so it also runs on a 32x8 matrix (the goldfish and angelfish are left out there and only the three tetras swim). The fish keep their positions across a reboot or a script reload.

Requirements

  • Ulanzi TC002 running an AWTRIX build with the Berry scripting engine (the AWTRIX NG port for the TC002, e.g. sanderdw/awtrix-ng-tc002). It will not run on stock AWTRIX 3 without Berry support.
  • The readable source is about 12 KB, over the 8 KiB script limit. The code to paste is a compact copy (comments and indentation stripped, about 7.5 KB); the logic is identical.
  • No icons, no external service, no network access needed (night mode needs the clock to know the time).

Setup

  1. Open the AWTRIX web interface, go to Scripts and create a new script named PixelAquarium and paste the compact code (the readable pixel-aquarium.be is over the 8 KiB limit as is).
  2. Save. The app appears in the app loop as "Pixel Aquarium".
  3. Optional: adjust the settings below (the script declares them with @config).

Controls

Input Action
Knob press (select) Feed the fish
Knob turn (left / right) Previous / next app (handled by AWTRIX, not by the script)

Settings (@config)

Setting Default Range Meaning
Water brightness 30 % 10-80 Brightness of the water
Night mode on on / off Dim the tank and let the fish doze at night
Night starts at 22 h 0-23 Start of the night
Night ends at 7 h 0-23 End of the night
Brightness at night 30 % 5-100 How dim everything is at night

More flows for AWTRIX NG Scripts or Miscellaneous

Something wrong with this flow? Report it.