# rems02/ttgo-development-kit architecture

> Architecture diagram of the GitHub repository rems02/ttgo-development-kit, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rems02/ttgo-development-kit
- Repository: https://github.com/rems02/ttgo-development-kit

## Overview

This MicroPython project drives a TTGO ST7789 display with text and graphics helpers, a button-operated feature menu, and example applications. The main workflow initializes the display, presents menu choices, and runs the selected clock/weather, font, sprite-animation, or FTP feature. The README also documents text positioning and shape drawing. Source excerpts establish the main dispatches and selected module dependencies; links to external APIs are supported by the clock source, while unsampled feature internals are not inferred.

Main entry points: [`main.py`](https://github.com/rems02/ttgo-development-kit/blob/main/main.py) (Main menu), [`toasters.py`](https://github.com/rems02/ttgo-development-kit/blob/main/toasters.py) (Toaster animation), [`horloge.py`](https://github.com/rems02/ttgo-development-kit/blob/main/horloge.py) (Clock and weather), [`WordProcessing.py`](https://github.com/rems02/ttgo-development-kit/blob/main/WordProcessing.py) (Text and graphics)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application flow"]
  node_main["Main menu<br/>[main.py]"]
  node_clock["Clock and weather<br/>[horloge.py]"]
  node_alternate_menu["Alternate menu<br/>[menu.py]"]
end

subgraph group_display["Display features"]
  node_fonts_demo["Font showcase<br/>[fonts.py]"]
  node_toaster_demo["Toaster animation<br/>[toasters.py]"]
  node_text_graphics["Text and graphics<br/>[WordProcessing.py]"]
end

subgraph group_network["Network services"]
  node_ftp_server["FTP server<br/>[ftp.py]"]
end

subgraph group_sprites["Sprite assets"]
  node_sprite1["Sprite frame 1<br/>[t1.py]"]
  node_sprite2["Sprite frame 2<br/>[t2.py]"]
  node_sprite3["Sprite frame 3<br/>[t3.py]"]
  node_sprite4["Sprite frame 4<br/>[t4.py]"]
  node_sprite5["Toast sprite<br/>[t5.py]"]
end

node_user(("Device user"))
node_st7789["ST7789 display driver"]
node_worldtime["WorldTime API"]
node_weather["OpenWeatherMap"]
node_ftp_client(("FTP client"))

node_user -->|"selects feature"| node_main
node_main -->|"renders menu"| node_text_graphics
node_main -->|"runs clock"| node_clock
node_main -->|"runs showcase"| node_fonts_demo
node_main -->|"runs animation"| node_toaster_demo
node_main -->|"starts server"| node_ftp_server
node_main -.->|"initializes display"| node_st7789
node_text_graphics -.->|"draws on"| node_st7789
node_clock -->|"renders text"| node_text_graphics
node_clock -->|"requests time"| node_worldtime
node_clock -->|"requests weather"| node_weather
node_fonts_demo -->|"draws fonts"| node_st7789
node_toaster_demo -->|"loads frames"| node_sprite1
node_toaster_demo -->|"loads frames"| node_sprite2
node_toaster_demo -->|"loads frames"| node_sprite3
node_toaster_demo -->|"loads frames"| node_sprite4
node_toaster_demo -->|"loads sprite"| node_sprite5
node_toaster_demo -->|"draws sprites"| node_st7789
node_ftp_client -.->|"transfers files"| node_ftp_server
node_alternate_menu -->|"renders menu"| node_text_graphics
node_alternate_menu -->|"runs clock"| node_clock

click node_main "https://github.com/rems02/ttgo-development-kit/blob/main/main.py"
click node_clock "https://github.com/rems02/ttgo-development-kit/blob/main/horloge.py"
click node_fonts_demo "https://github.com/rems02/ttgo-development-kit/blob/main/fonts.py"
click node_toaster_demo "https://github.com/rems02/ttgo-development-kit/blob/main/toasters.py"
click node_text_graphics "https://github.com/rems02/ttgo-development-kit/blob/main/WordProcessing.py"
click node_alternate_menu "https://github.com/rems02/ttgo-development-kit/blob/main/menu.py"
click node_ftp_server "https://github.com/rems02/ttgo-development-kit/blob/main/ftp.py"
click node_sprite1 "https://github.com/rems02/ttgo-development-kit/blob/main/t1.py"
click node_sprite2 "https://github.com/rems02/ttgo-development-kit/blob/main/t2.py"
click node_sprite3 "https://github.com/rems02/ttgo-development-kit/blob/main/t3.py"
click node_sprite4 "https://github.com/rems02/ttgo-development-kit/blob/main/t4.py"
click node_sprite5 "https://github.com/rems02/ttgo-development-kit/blob/main/t5.py"

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_main,node_clock,node_alternate_menu,node_user,node_ftp_client toneBlue
class node_fonts_demo,node_toaster_demo,node_text_graphics toneAmber
class node_ftp_server,node_worldtime toneMint
class node_sprite1,node_sprite2,node_sprite3,node_sprite4,node_sprite5 toneRose
class node_st7789,node_weather toneIndigo
```

## Components

### Application flow

- [Main menu](https://github.com/rems02/ttgo-development-kit/blob/main/main.py): `main.py`
- [Clock and weather](https://github.com/rems02/ttgo-development-kit/blob/main/horloge.py): `horloge.py`
- [Alternate menu](https://github.com/rems02/ttgo-development-kit/blob/main/menu.py): `menu.py`

### Display features

- [Font showcase](https://github.com/rems02/ttgo-development-kit/blob/main/fonts.py): `fonts.py`
- [Toaster animation](https://github.com/rems02/ttgo-development-kit/blob/main/toasters.py): `toasters.py`
- [Text and graphics](https://github.com/rems02/ttgo-development-kit/blob/main/WordProcessing.py): `WordProcessing.py`

### Network services

- [FTP server](https://github.com/rems02/ttgo-development-kit/blob/main/ftp.py): `ftp.py`

### Sprite assets

- [Sprite frame 1](https://github.com/rems02/ttgo-development-kit/blob/main/t1.py): `t1.py`
- [Sprite frame 2](https://github.com/rems02/ttgo-development-kit/blob/main/t2.py): `t2.py`
- [Sprite frame 3](https://github.com/rems02/ttgo-development-kit/blob/main/t3.py): `t3.py`
- [Sprite frame 4](https://github.com/rems02/ttgo-development-kit/blob/main/t4.py): `t4.py`
- [Toast sprite](https://github.com/rems02/ttgo-development-kit/blob/main/t5.py): `t5.py`

### Other components

- **Device user**
- **ST7789 display driver**
- **WorldTime API**
- **OpenWeatherMap**
- **FTP client**

## Connections

- Device user → Main menu: selects feature (evidence: `main.py`)
- Main menu → Text and graphics: renders menu (evidence: `main.py`)
- Main menu → Clock and weather: runs clock (evidence: `main.py`)
- Main menu → Font showcase: runs showcase (evidence: `main.py`)
- Main menu → Toaster animation: runs animation (evidence: `main.py`)
- Main menu → FTP server: starts server (evidence: `main.py`)
- Main menu → ST7789 display driver: initializes display
- Text and graphics → ST7789 display driver: draws on
- Clock and weather → Text and graphics: renders text (evidence: `horloge.py`)
- Clock and weather → WorldTime API: requests time (evidence: `horloge.py`)
- Clock and weather → OpenWeatherMap: requests weather (evidence: `horloge.py`)
- Font showcase → ST7789 display driver: draws fonts (evidence: `fonts.py`)
- Toaster animation → Sprite frame 1: loads frames (evidence: `toasters.py`)
- Toaster animation → Sprite frame 2: loads frames (evidence: `toasters.py`)
- Toaster animation → Sprite frame 3: loads frames (evidence: `toasters.py`)
- Toaster animation → Sprite frame 4: loads frames (evidence: `toasters.py`)
- Toaster animation → Toast sprite: loads sprite (evidence: `toasters.py`)
- Toaster animation → ST7789 display driver: draws sprites (evidence: `toasters.py`)
- FTP client → FTP server: transfers files
- Alternate menu → Text and graphics: renders menu (evidence: `menu.py`)
- Alternate menu → Clock and weather: runs clock (evidence: `menu.py`)
