# serra110/tamacatchi architecture

> Architecture diagram of the GitHub repository serra110/tamacatchi, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-22). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/serra110/tamacatchi
- Repository: https://github.com/serra110/tamacatchi

## Overview

Tamacatchi is a handheld virtual-pet device: the user operates buttons or moves the device, the pet reacts through care actions, and the display presents the pet and its stats. The documented hardware includes an MPU6050 for tilt and shake, a temperature/humidity sensor, RTC, screen, and buzzer; KiCad schematic and PCB files describe the physical design. No firmware excerpts were available, so the firmware components share the sketch path and edges are limited to relationships stated in the README.

Main entry points: [`Starbie.ino`](https://github.com/serra110/tamacatchi/blob/main/Starbie.ino) (Pet stats), [`starbie.kicad_sch`](https://github.com/serra110/tamacatchi/blob/main/starbie.kicad_sch) (Circuit schematic), [`starbie.kicad_pcb`](https://github.com/serra110/tamacatchi/blob/main/starbie.kicad_pcb) (PCB layout)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["User interaction"]
  node_controls["Buttons<br/>[Starbie.ino]"]
  node_motion["Motion input<br/>[Starbie.ino]"]
  node_menu["Radial menu<br/>[Starbie.ino]"]
end

subgraph group_pet["Pet experience"]
  node_care["Care actions<br/>[Starbie.ino]"]
  node_pet_state["Pet stats<br/>[Starbie.ino]"]
  node_pet_view["Pet view<br/>[Starbie.ino]"]
  node_stats_view["Stats view<br/>[Starbie.ino]"]
end

subgraph group_hardware["Device hardware"]
  node_screen["Display<br/>[Starbie.ino]"]
  node_imu["MPU6050<br/>[Starbie.ino]"]
  node_climate["Temp/humidity sensor<br/>[Starbie.ino]"]
  node_rtc["RTC<br/>[Starbie.ino]"]
  node_buzzer["Buzzer<br/>[Starbie.ino]"]
  node_schematic["Circuit schematic<br/>[starbie.kicad_sch]"]
  node_pcb["PCB layout<br/>[starbie.kicad_pcb]"]
end

node_user(("Pet caretaker"))

node_user -->|"presses"| node_controls
node_user -->|"tilts or shakes"| node_motion
node_controls -->|"opens or confirms"| node_menu
node_controls -->|"switches view"| node_stats_view
node_motion -->|"navigates"| node_menu
node_motion -->|"changes stats"| node_pet_state
node_menu -->|"selects action"| node_care
node_care -->|"changes stats"| node_pet_state
node_pet_state -->|"shown in"| node_pet_view
node_pet_state -->|"shown in"| node_stats_view
node_pet_view -->|"displays"| node_screen
node_stats_view -->|"displays"| node_screen
node_imu -->|"provides movement input"| node_motion
node_climate -.->|"provides readings"| node_pet_state
node_rtc -.->|"provides time"| node_pet_state
node_care -.->|"sound feedback"| node_buzzer
node_schematic -->|"describes circuit layout"| node_pcb

click node_controls "https://github.com/serra110/tamacatchi/blob/main/Starbie.ino"
click node_motion "https://github.com/serra110/tamacatchi/blob/main/Starbie.ino"
click node_menu "https://github.com/serra110/tamacatchi/blob/main/Starbie.ino"
click node_care "https://github.com/serra110/tamacatchi/blob/main/Starbie.ino"
click node_pet_state "https://github.com/serra110/tamacatchi/blob/main/Starbie.ino"
click node_pet_view "https://github.com/serra110/tamacatchi/blob/main/Starbie.ino"
click node_stats_view "https://github.com/serra110/tamacatchi/blob/main/Starbie.ino"
click node_screen "https://github.com/serra110/tamacatchi/blob/main/Starbie.ino"
click node_imu "https://github.com/serra110/tamacatchi/blob/main/Starbie.ino"
click node_climate "https://github.com/serra110/tamacatchi/blob/main/Starbie.ino"
click node_rtc "https://github.com/serra110/tamacatchi/blob/main/Starbie.ino"
click node_buzzer "https://github.com/serra110/tamacatchi/blob/main/Starbie.ino"
click node_schematic "https://github.com/serra110/tamacatchi/blob/main/starbie.kicad_sch"
click node_pcb "https://github.com/serra110/tamacatchi/blob/main/starbie.kicad_pcb"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_controls,node_motion,node_menu toneBlue
class node_care,node_pet_state,node_pet_view,node_stats_view toneAmber
class node_screen,node_imu,node_climate,node_rtc,node_buzzer,node_schematic,node_pcb toneMint
class node_user toneIndigo
```

## Components

### User interaction

- [Buttons](https://github.com/serra110/tamacatchi/blob/main/Starbie.ino): `Starbie.ino`
- [Motion input](https://github.com/serra110/tamacatchi/blob/main/Starbie.ino): `Starbie.ino`
- [Radial menu](https://github.com/serra110/tamacatchi/blob/main/Starbie.ino): `Starbie.ino`

### Pet experience

- [Care actions](https://github.com/serra110/tamacatchi/blob/main/Starbie.ino): `Starbie.ino`
- [Pet stats](https://github.com/serra110/tamacatchi/blob/main/Starbie.ino): `Starbie.ino`
- [Pet view](https://github.com/serra110/tamacatchi/blob/main/Starbie.ino): `Starbie.ino`
- [Stats view](https://github.com/serra110/tamacatchi/blob/main/Starbie.ino): `Starbie.ino`

### Device hardware

- [Display](https://github.com/serra110/tamacatchi/blob/main/Starbie.ino): `Starbie.ino`
- [MPU6050](https://github.com/serra110/tamacatchi/blob/main/Starbie.ino): `Starbie.ino`
- [Temp/humidity sensor](https://github.com/serra110/tamacatchi/blob/main/Starbie.ino): `Starbie.ino`
- [RTC](https://github.com/serra110/tamacatchi/blob/main/Starbie.ino): `Starbie.ino`
- [Buzzer](https://github.com/serra110/tamacatchi/blob/main/Starbie.ino): `Starbie.ino`
- [Circuit schematic](https://github.com/serra110/tamacatchi/blob/main/starbie.kicad_sch): `starbie.kicad_sch`
- [PCB layout](https://github.com/serra110/tamacatchi/blob/main/starbie.kicad_pcb): `starbie.kicad_pcb`

### Other components

- **Pet caretaker**

## Connections

- Pet caretaker → Buttons: presses (evidence: `README.md`)
- Pet caretaker → Motion input: tilts or shakes (evidence: `README.md`)
- Buttons → Radial menu: opens or confirms (evidence: `README.md`)
- Buttons → Stats view: switches view (evidence: `README.md`)
- Motion input → Radial menu: navigates (evidence: `README.md`)
- Motion input → Pet stats: changes stats (evidence: `README.md`)
- Radial menu → Care actions: selects action (evidence: `README.md`)
- Care actions → Pet stats: changes stats (evidence: `README.md`)
- Pet stats → Pet view: shown in (evidence: `README.md`)
- Pet stats → Stats view: shown in (evidence: `README.md`)
- Pet view → Display: displays (evidence: `README.md`)
- Stats view → Display: displays (evidence: `README.md`)
- MPU6050 → Motion input: provides movement input (evidence: `README.md`)
- Temp/humidity sensor → Pet stats: provides readings
- RTC → Pet stats: provides time
- Care actions → Buzzer: sound feedback
- Circuit schematic → PCB layout: describes circuit layout (evidence: `README.md`)
