Deprecated: Creation of dynamic property Timber\Site::$pingback is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Site.php on line 180

Deprecated: Creation of dynamic property Timber\User::$name is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/User.php on line 118

Deprecated: Creation of dynamic property Timber\Post::$has_disclaimer is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_edit_lock is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_edit_last is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$tipologia is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_tipologia is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$attributi is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_attributi is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$fonte is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_fonte is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$fonte_url is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_fonte_url is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$os_meta is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_primary_category is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_primary_blz_affiliation_attributes is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_primary_content_type is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_primary_attributes is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_primary_speciali is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_focuskw is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_metadesc is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_linkdex is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_content_score is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_focuskeywords is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_keywordsynonyms is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_estimated-reading-time-minutes is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_thumbnail_id is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$os_previous_publish_date is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$os_notification_id is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_indexnow_last_ping is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_oembed_6f8da8e8af3a88ac4c433fd0611a8dae is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_oembed_time_6f8da8e8af3a88ac4c433fd0611a8dae is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_date_gmt is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$comment_status is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$ping_status is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_password is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_name is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$to_ping is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$pinged is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_modified is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_modified_gmt is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_content_filtered is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$guid is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$menu_order is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_mime_type is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$comment_count is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$filter is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$status is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71
Questo acquario ASCII con ESP32 sta conquistando i maker

Questo acquario ASCII con ESP32 sta conquistando i maker

ASCII Aquarium usa un ESP32 Cheap Yellow Display per generare in tempo reale un acquario ASCII interattivo con pesci animati, WiFi, touchscreen e supporto SD.

Un piccolo display touch da pochi euro, un microcontrollore ESP32 e una manciata di caratteri ASCII trasformati in pesci animati. L’idea dietro ASCII Aquarium nasce così: basta prendere la scheda ESP32-2432S028R, nota nella comunità maker come “Cheap Yellow Display” o semplicemente CYD, e usarla come acquario digitale interattivo. Il risultato non assomiglia ai classici screensaver pre-renderizzati degli anni ’90; il firmware genera in tempo reale movimenti, interazioni e animazioni direttamente sul microcontroller.

CYD è diventato popolare grazie al prezzo molto basso e a una dotazione sorprendentemente completa: display TFT da 320×240 pixel basato su controller ILI9341, touchscreen resistivo XPT2046, WiFi integrato e slot microSD opzionale. Negli ultimi due anni queste schede hanno invaso GitHub e i forum dedicati all’ESP32; si vedono dashboard IoT, sintetizzatori MIDI, pannelli radioamatoriali e interfacce industriali. ASCII Aquarium sfrutta la stessa base hardware e la porta in una direzione completamente diversa: un oggetto decorativo che però resta, tecnicamente, un software embedded piuttosto sofisticato.

Dietro l’aspetto giocoso c’è infatti un rendering live eseguito dall’ESP32 senza accelerazione grafica dedicata: ogni pesce ASCII ha un comportamento autonomo; cambia direzione, evita collisioni, reagisce al cibo e modifica luminosità e profondità apparente.

Acquario ASCII ESP32

Rendering ASCII in tempo reale su ESP32

Molti progetti retrò in stile terminale usano sequenze video o sprite statici mentre ASCII Aquarium sceglie una soluzione differente: genera la scena frame per frame direttamente sul microcontrollore. La libreria grafica utilizzata deriva dal framework TFT_eSPI, molto diffuso nell’ambiente ESP32 per via delle ottimizzazioni SPI dedicate ai display ILI9341.

Ogni elemento sullo schermo è calcolato in tempo reale: pesci, bolle, alghe, particelle di cibo e visitatori occasionali come polpi e cavallucci marini. Il firmware gestisce una simulazione semplificata del movimento di gruppo, ispirata agli algoritmi boids, modelli utilizzati nella computer grafica per riprodurre il comportamento collettivo di stormi, banchi di pesci e altri sistemi coordinati. I pesci non seguono traiettorie predefinite: ricevono vettori di direzione influenzati dalla vicinanza di altri oggetti, dalla presenza di cibo e dalla distanza dai bordi dello schermo.

La scelta dell’ASCII non serve solo a dare un’estetica retrò. Ridurre gli sprite a caratteri testuali diminuisce drasticamente il carico grafico e permette aggiornamenti fluidi anche con una banda SPI limitata.

Cheap Yellow Display: perché questa scheda è diventata così popolare

Il nome “Cheap Yellow Display” non è ufficiale: nasce dalla colorazione gialla del PCB venduto in massa su molteplici marketplace. La sigla tecnica più comune è ESP32-2432S028R: all’interno si trova un ESP32-WROOM-32 con Wi-Fi 802.11 b/g/n, Bluetooth classico e BLE.

La scheda integra quasi tutto ciò che serve per prototipi interattivi: alimentazione USB, touchscreen resistivo, backlight controllabile, slot microSD e GPIO. Per chi sviluppa firmware grafici è una combinazione difficile da ignorare: costa meno di molti display SPI standalone.

ASCII Aquarium sfrutta parecchi di questi componenti contemporaneamente: il touchscreen gestisce alimentazione virtuale dei pesci e menu nascosti; il WiFi sincronizza l’orologio tramite NTP; la memoria persistente salva le preferenze usando il sottosistema ESP32 Preferences basato su NVS flash; la microSD memorizza screenshot BMP e sequenze di frame.

Installazione via browser e firmware WebSerial

Una parte interessante del progetto riguarda il sistema di flashing. ASCII Aquarium supporta l’installazione diretta dal browser tramite ESP Web Tools: Chrome o Edge possono comunicare con il microcontroller ESP32 usando WebSerial senza passare da esptool.py o Arduino IDE.

L’utente collega il CYD via USB, apre la pagina del flasher e carica il firmware con pochi clic: i passaggi da seguire sono chiaramente descritti nel repository GitHub ufficiale.

Va considerato però un dettaglio tecnico importante: molte varianti del CYD montano componenti differenti pur avendo aspetto quasi identico. Cambiano controller touch, wiring SPI oppure gestione SD. Il perfetto funzionamento di ASCII Aquarium è garantito per configurazioni come questa.

Chi compila il progetto manualmente deve quindi verificare con attenzione mapping dei pin, frequenze SPI e setup TFT_eSPI. Altrimenti il risultato classico è uno schermo bianco o un touch completamente disallineato.

Interfaccia touch e simulazione comportamentale

L’acquario non resta passivo sul tavolo: toccare lo schermo rilascia particelle di cibo che i pesci inseguono modificando traiettoria e velocità. In alto a sinistra compare un HUD nascosto con menu di configurazione: densità delle bolle, lunghezza delle alghe, frequenza dei visitatori, orologio e sfondi.

Le opzioni sembrano semplici ma nascondono una certa cura nel design software. Gestire fino a 36 pesci animati, decine di bolle e vari elementi ambientali su ESP32 richiede attenzione alla memoria heap e ai cicli di rendering. In pratica il firmware deve evitare allocazioni dinamiche frequenti; altrimenti la frammentazione RAM finirebbe per degradare stabilità e fluidità.

L’orologio integrato supporta il formato a 12 e 24 ore, selezione del fuso orario e sincronizzazione Internet. Non è nulla di particolarmente innovativo, ma integrare tutto in un firmware embedded con interfaccia grafica touch completa, gestione della connettività WiFi e salvataggio permanente delle configurazioni richiede un notevole lavoro di coordinamento tra i vari task di FreeRTOS, il sistema operativo real-time utilizzato nei dispositivi di questo tipo.

Acquario ASCII ESP32 con prisma

Una funzione particolarmente interessante è la modalità flip clock, progettata per funzionare con cubi ottici beam splitter, cioè prismi semiriflettenti che dividono e riflettono la luce. In questa configurazione, l’immagine del display viene riflessa all’interno di un prisma da 50 mm creando l’effetto visivo di un acquario sospeso nel vetro. Lo stesso principio ottico è utilizzato anche nei piccoli teleprompter e nei display pseudo-olografici, dove le immagini sembrano fluttuare nello spazio.

Ti consigliamo anche

Link copiato negli appunti