# kurbz-codes/desk_assistant architecture

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

- Interactive diagram: https://gitdiagram.com/kurbz-codes/desk_assistant
- Repository: https://github.com/kurbz-codes/desk_assistant

## Overview

Desk Assistant is Arduino firmware for a hardware-based desktop productivity companion. Its principal workflow polls peripherals continuously, handles recognized speech and encoder input, updates Pomodoro work/break state, and presents information on a paginated 16×2 LCD; buzzer playback provides melodies and alerts. The README documents these capabilities and the polling-loop coordination, but the firmware source was not included in the excerpts, so component-level wiring beyond those statements is not asserted.

Main entry points: [`Desk_Assistant.ino`](https://github.com/kurbz-codes/desk_assistant/blob/main/Desk_Assistant.ino) (Polling Loop), [`pitches.h`](https://github.com/kurbz-codes/desk_assistant/blob/main/pitches.h) (Note Frequencies)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Firmware Runtime"]
  node_poll_loop["Polling Loop<br/>[Desk_Assistant.ino]"]
end

subgraph group_interaction["User Interaction"]
  node_speech["Speech Events<br/>[Desk_Assistant.ino]"]
  node_encoder_ui["Encoder UI<br/>[Desk_Assistant.ino]"]
  node_display["LCD Display<br/>[Desk_Assistant.ino]"]
  node_text_paging["Text Pagination<br/>[Desk_Assistant.ino]"]
end

subgraph group_productivity["Productivity Features"]
  node_pomodoro["Pomodoro Timer<br/>[Desk_Assistant.ino]"]
  node_melody_alerts["Melody Alerts<br/>[Desk_Assistant.ino]"]
  node_note_table["Note Frequencies<br/>[pitches.h]"]
end

node_user(("User"))
node_asr["I2C ASR"]
node_encoder["Rotary Encoder"]
node_lcd["16×2 LCD"]
node_buzzer["Piezo Buzzer"]

node_user -->|"speaks commands"| node_asr
node_poll_loop -->|"handles events"| node_speech
node_poll_loop -->|"updates state"| node_pomodoro
node_poll_loop -->|"handles input"| node_encoder_ui
node_asr -->|"provides recognition"| node_speech
node_encoder -->|"provides input"| node_encoder_ui
node_display -->|"renders on"| node_lcd
node_text_paging -->|"formats text"| node_display
node_melody_alerts -->|"plays alerts"| node_buzzer
node_note_table -.->|"defines pitches"| node_melody_alerts

click node_poll_loop "https://github.com/kurbz-codes/desk_assistant/blob/main/Desk_Assistant.ino"
click node_speech "https://github.com/kurbz-codes/desk_assistant/blob/main/Desk_Assistant.ino"
click node_encoder_ui "https://github.com/kurbz-codes/desk_assistant/blob/main/Desk_Assistant.ino"
click node_display "https://github.com/kurbz-codes/desk_assistant/blob/main/Desk_Assistant.ino"
click node_text_paging "https://github.com/kurbz-codes/desk_assistant/blob/main/Desk_Assistant.ino"
click node_pomodoro "https://github.com/kurbz-codes/desk_assistant/blob/main/Desk_Assistant.ino"
click node_melody_alerts "https://github.com/kurbz-codes/desk_assistant/blob/main/Desk_Assistant.ino"
click node_note_table "https://github.com/kurbz-codes/desk_assistant/blob/main/pitches.h"

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_poll_loop,node_user toneBlue
class node_speech,node_encoder_ui,node_display,node_text_paging toneAmber
class node_pomodoro,node_melody_alerts,node_note_table toneMint
class node_asr,node_encoder,node_lcd,node_buzzer toneIndigo
```

## Components

### Firmware Runtime

- [Polling Loop](https://github.com/kurbz-codes/desk_assistant/blob/main/Desk_Assistant.ino): `Desk_Assistant.ino`

### User Interaction

- [Speech Events](https://github.com/kurbz-codes/desk_assistant/blob/main/Desk_Assistant.ino): `Desk_Assistant.ino`
- [Encoder UI](https://github.com/kurbz-codes/desk_assistant/blob/main/Desk_Assistant.ino): `Desk_Assistant.ino`
- [LCD Display](https://github.com/kurbz-codes/desk_assistant/blob/main/Desk_Assistant.ino): `Desk_Assistant.ino`
- [Text Pagination](https://github.com/kurbz-codes/desk_assistant/blob/main/Desk_Assistant.ino): `Desk_Assistant.ino`

### Productivity Features

- [Pomodoro Timer](https://github.com/kurbz-codes/desk_assistant/blob/main/Desk_Assistant.ino): `Desk_Assistant.ino`
- [Melody Alerts](https://github.com/kurbz-codes/desk_assistant/blob/main/Desk_Assistant.ino): `Desk_Assistant.ino`
- [Note Frequencies](https://github.com/kurbz-codes/desk_assistant/blob/main/pitches.h): `pitches.h`

### Other components

- **User**
- **I2C ASR**
- **Rotary Encoder**
- **16×2 LCD**
- **Piezo Buzzer**

## Connections

- User → I2C ASR: speaks commands (evidence: `README.md`)
- Polling Loop → Speech Events: handles events (evidence: `README.md`)
- Polling Loop → Pomodoro Timer: updates state (evidence: `README.md`)
- Polling Loop → Encoder UI: handles input (evidence: `README.md`)
- I2C ASR → Speech Events: provides recognition (evidence: `README.md`)
- Rotary Encoder → Encoder UI: provides input (evidence: `README.md`)
- LCD Display → 16×2 LCD: renders on (evidence: `README.md`)
- Text Pagination → LCD Display: formats text (evidence: `README.md`)
- Melody Alerts → Piezo Buzzer: plays alerts (evidence: `README.md`)
- Note Frequencies → Melody Alerts: defines pitches
