Releases: adhamhaithameid/Arduino-Console
Releases · adhamhaithameid/Arduino-Console
V2 — Unified UI, Screensaver, Big Memory Cut
📦 Build Footprint
Sketch uses 18498 bytes (57%) of program storage space. Maximum is 32256 bytes.
Global variables use 1653 bytes (80%) of dynamic memory, leaving 395 bytes for local variables. Maximum is 2048 bytes.
V1 previously used ~98% of flash. V2 dramatically reduces usage by deduping LCD/buttons and embedding all games under a single UI.
✨ Highlights
- Unified Menu UI: single
setup()/loop()
inUI.ino
; all games launched as runners. - Eye Animation screensaver: auto-runs after 30s of no input on the menu.
- Chrome Dino: two-cell T-Rex preserved; dual lane (cactus bottom / bird top); score-based difficulty; fixed Game Over.
- Input stability: namespaced buttons (
UI_BTN_*
in UI,DINO_BTN_*
in Dino) to avoid macro clashes. - Embed-safe games: no duplicate globals; shared
LiquidCrystal
andread_LCD_buttons()
viaextern
.
🛠 Changes (since V1)
- Merged multiple sketches into a single UI build; removed stub duplicates.
- Added 30s idle detection → runs Eye Animation; returns on any key.
- Dino: SELECT to start/restart; jump on UP/SELECT; clean collision handling.
- Helicopter: Press SELECT to restart at Game Over (stable A0 read via
read_LCD_buttons()
). - Standardized exit behavior (hold LEFT to return to menu in embedded runners, where implemented).
🐛 Fixes
- Fixed “double death” Game Over in Dino (no ghost continue).
- Resolved
BTN_SELECT
macro collisions across sketches by namespacing. - Eliminated redefinition errors (
LiquidCrystal lcd
,setup/loop
) in multi-file builds.
🔧 Upgrade Guide (V1 → V2)
- Open the
UI
build and ensure only onesetup()
/loop()
lives inUI.ino
. - Use one global LCD:
LiquidCrystal lcd(8,9,4,5,6,7)
in UI.ino only.
Games should useextern LiquidCrystal lcd;
(already set up in V2 files). - Buttons: keep a single
read_LCD_buttons()
in UI.ino and reuse viaextern
. - Dino embedding: ensure
#define EMBED_DINO_IN_UI 1
is present in the UI build so Dino reuses UI resources. - Remove duplicates of standalone game files that define their own
setup/loop/lcd
when compiling the UI project.
📁 Files (V2)
UI/UI.ino
(entry point; menu + screensaver + shared LCD/buttons)UI/*.ino
(runners for Snake, Bricks, Helicopter, Compass, Days, Eye)Chrome_Dino/Chrome_Dino.ino
(embed-ready; preserved sprite pixels)snake_game/snake_game.ino
,Break_the_Bricks/Break_the_Bricks.ino
,Helicopter_Game/Helicopter_Game.ino
, etc.
⚠️ Notes / Known Limits
- SRAM is tight (~80%): keep locals small; move string literals to flash with
F("...")
; considerPROGMEM
for sprites if you add more. - A0 thresholds vary by shield: prefer
read_LCD_buttons()
enum checks over raw analog ranges. - Keep custom char budget (8) in mind; V2 locks dino sprites in 0–6 and animates the bird in slot 7 only.
✅ Verification
- Boot → menu shows all apps (including Chrome Dino).
- Idle for 30s on menu → Eye Animation appears; any key returns.
- Dino: SELECT starts/restarts; UP/SELECT jumps; collisions end game immediately.
- Helicopter: at Game Over, SELECT restarts reliably.
Made with ♥ on an Uno, tiny RAM, and lots of sprites.