How cifertech/tamafi works
TamaFi is ESP32-S3 virtual-pet firmware: device inputs and nearby WiFi inform pet behavior, which updates the pet’s life state and is presented through the TFT interface, sound, and LEDs. The README documents autonomous hunting, exploration, rest, mood, evolution, menus, and persistent settings. The main firmware and several behavior modules are unsampled, so documented relationships are cited to the README; UI asset use is supported by the ui.cpp reference index and excerpt.
Main entry points: ui.cpp Screens and menus · TamaFi.ino Firmware loop · egg_hatch.h Hatch and rest · ui_anim.h Animation timing
Components 16
Pet Behavior
- Firmware loop
TamaFi/TamaFi.ino - Decision engine
TamaFi/TamaFi.ino - Stats and evolution
TamaFi/TamaFi.ino - Hatch and rest
TamaFi/egg_hatch.h
Display Interface
- Screens and menus
TamaFi/ui.cpp - Animation timing
TamaFi/ui_anim.h
Device Services
- TFT display
User_Setup.h - Flash preferences
TamaFi/TamaFi.ino - NeoPixel feedback
TamaFi/TamaFi.ino - Retro sound
TamaFi/TamaFi.ino
Visual Assets
- Pet sprites
TamaFi/StoneGolem.h - Background art
TamaFi/background.h - Effect art
TamaFi/effect.h
Other components
- Pet owner
- Tactile buttons
- Nearby WiFi
Connections 15
- Pet owner → Tactile buttons: presses
README.md - Tactile buttons → Firmware loop: controls
README.md - Firmware loop → Decision engine: updates
README.md - Nearby WiFi → Decision engine: informs
README.md - Decision engine → Stats and evolution: adjusts stats
README.md - Decision engine → Hatch and rest: triggers rest
README.md - Firmware loop → Screens and menus: draws screens
README.md - Screens and menus → TFT display: renders
README.md - Screens and menus → Animation timing: uses timings
TamaFi/ui.cpp - Screens and menus → Pet sprites: renders sprites
TamaFi/ui.cpp - Screens and menus → Background art: draws background
TamaFi/ui.cpp - Screens and menus → Effect art: draws overlays
TamaFi/ui.cpp - Firmware loop → Flash preferences: saves settings
README.md - Decision engine → NeoPixel feedback: sets mood patterns
README.md - Firmware loop → Retro sound: plays sequences
README.md