[TC002] Pixel Aquarium
On your display
Living 52x16 aquarium: press the knob to feed the fish, weeds sway, bubbles rise, and it dims and sleeps at night.
- 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.
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
- Open the AWTRIX web interface, go to Scripts and create a new script named
PixelAquariumand paste the compact code (the readablepixel-aquarium.beis over the 8 KiB limit as is). - Save. The app appears in the app loop as "Pixel Aquarium".
- 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 |
Sign in to view and copy the code of this flow.
Discussion 0
Ask a question, suggest a change or share how you use it.
No comments yet. Start the conversation.
More flows for AWTRIX NG Scripts or Miscellaneous
Something wrong with this flow? Report it.
Have an idea?
Sign in to ask questions and join the conversation.