Skip to content

Lagerpun/esp32-cyd-aquarium

Repository files navigation

ESP32 CYD Aquarium

A little animated pixel aquarium for the ESP32-2432S028R, better known as the Cheap Yellow Display. It's adapted from Livegrid OpenMatrix.

License: AGPL-3.0 Platform: ESP32-2432S028R Built with PlatformIO Support on Ko-fi

ESP32 CYD Aquarium running on a Cheap Yellow Display

MP4 video

It turns one of these small 2.8 inch ESP32 touchscreens into a self-running desk aquarium: moving water, a handful of small creatures, plants, drifting food, and a 12-hour clock. Give it Wi-Fi and it syncs the time over NTP; leave Wi-Fi out and it still runs fine on its own. It also dims its own backlight using the light sensor already on the board.

It's my own CYD take on the OpenMatrix aquarium, not a straight port of the original HUB75 RGB matrix project. The default build is just about the screen, so you don't need any external temperature, humidity, or CO2 sensors to run it.

What It Does

It boots straight into the scene and keeps itself going without you touching anything. Bigger creatures swim around while smaller stuff drifts in the background, and the whole thing is drawn on the TFT in a way that mimics a small LED matrix.

Features

  • Standalone live aquarium mode for the ESP32-2432S028R / CYD board.
  • 240x320 ILI9341 TFT output with an 80x106 logical pixel-aquarium frame.
  • Dot-grid renderer that gives the TFT a small LED-matrix look.
  • Autonomous fish, stars, turtles, snakes, octopuses, boids, plants, food, and animated water.
  • 12-hour clock with AM/PM, seconds, and a date overlay.
  • Optional Wi-Fi/NTP time sync, with a compile-time fallback when there's no network.
  • Wi-Fi disconnects on its own after the NTP sync by default.
  • Automatic TFT backlight using the onboard GPIO34 light sensor.
  • Optional touch-to-feed.
  • No external environmental sensors needed for the default build.
  • Tested on the common ESP32-2432S028R / Cheap Yellow Display hardware.

Hardware

Tested on:

Part Detail
Board ESP32-2432S028R / Cheap Yellow Display style
Module ESP32-WROOM-32 class
Display 2.8 inch 240x320 ILI9341 TFT
Touch XPT2046 resistive
Light sensor Onboard, on GPIO34

CYD boards and clones vary. Start with the tested configuration in this repo, then see docs/HARDWARE.md and docs/TROUBLESHOOTING.md if your board behaves differently.

Quick Start

Install PlatformIO first, then build the default environment:

pio run -e esp32-2432s028r

Flash your board, replacing COMx with your serial port:

pio run -e esp32-2432s028r -t upload --upload-port COMx

Open the monitor:

pio device monitor --environment esp32-2432s028r --baud 115200 --port COMx

Detailed steps are in docs/BUILD_AND_FLASH.md.

Wi-Fi and Time

Wi-Fi is optional. Without Wi-Fi credentials, the aquarium still boots and uses the firmware compile time as a fallback clock.

For NTP time sync, copy:

include/WifiSecrets.example.h

to:

include/WifiSecrets.h

Then fill in your own Wi-Fi name and password. WifiSecrets.h is ignored by git on purpose.

See docs/WIFI_TIME.md.

Documentation

Support ☕

I built this for fun and put it out there for free. If you've enjoyed it and would like to see it grow, buying me a coffee helps me keep tinkering and adding new things to it. A star, an issue about your board variant, or a short hardware report are always welcome too.

Buy Me a Coffee at ko-fi.com

Attribution

This project is based on Livegrid OpenMatrix, an AGPL-3.0 project for ESP32-driven HUB75 RGB matrices.

I've adapted the aquarium idea and the supporting code for the ESP32-2432S028R / Cheap Yellow Display TFT board. That meant changing the display target, the hardware assumptions, the clock behavior, the backlight handling, and a fair bit of scene tuning for this smaller screen. It isn't an official Livegrid project.

See docs/ATTRIBUTION.md.

License

This project is released under the GNU Affero General Public License v3.0 because the upstream OpenMatrix project is AGPL-3.0.

See LICENSE.

About

A self-running little pixel aquarium for the CYD / Cheap Yellow Display (ESP32-2432S028R)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

 
 
 

Contributors