# roboticsbrno/robutek architecture

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

- Interactive diagram: https://gitdiagram.com/roboticsbrno/robutek
- Repository: https://github.com/roboticsbrno/robutek

## Overview

Robůtek is an ESP32-S3 robot platform programmed with Jaculus. A user program creates a version-specific robot, then commands its differential drive, sensors and accessories; V2 also initializes battery monitoring. The repository includes substantial V1/V2 lessons and extension documentation, but the sampled code centers on the runtime library. Edges below use the README or shown source; optional hardware drivers without demonstrated callers are left unconnected.

Main entry points: [`robutekLibrary/src/example.ts`](https://github.com/roboticsbrno/robutek/blob/main/robutekLibrary/src/example.ts) (Example robot program), [`robutekLibrary/src/libs/robutek.ts`](https://github.com/roboticsbrno/robutek/blob/main/robutekLibrary/src/libs/robutek.ts) (Robot factory), [`robutekLibrary/src/libs/differentialDrive.ts`](https://github.com/roboticsbrno/robutek/blob/main/robutekLibrary/src/libs/differentialDrive.ts) (Differential drive), [`robutekLibrary/src/libs/batteryChecker.ts`](https://github.com/roboticsbrno/robutek/blob/main/robutekLibrary/src/libs/batteryChecker.ts) (Battery monitoring)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_robot_runtime["Robot runtime"]
  node_robot_program["Example robot program<br/>[example.ts]"]
  node_robot_factory["Robot factory<br/>[robutek.ts]"]
  node_battery_checker["Battery monitoring<br/>[batteryChecker.ts]"]
  node_battery_driver["BQ2589 driver<br/>[bq2589.ts]"]
end

subgraph group_motion["Motion and sensing"]
  node_differential_drive["Differential drive"]
end

subgraph group_accessories["Accessories"]
  node_servo["Servo control<br/>[servo.ts]"]
  node_color_utils["Color utilities<br/>[colors.ts]"]
  node_color_sensor["RGB sensor driver<br/>[zscs2016c.ts]"]
  node_distance_sensor["Distance sensor driver<br/>[VL53L0X.ts]"]
end

node_programmer(("Robot programmer"))
node_jaculus{{"Jaculus runtime"}}
node_robot_hardware{{"ESP32-S3 robot hardware"}}
node_battery_ic{{"Battery monitor IC"}}
node_smart_led{{"Smart LED hardware"}}

node_programmer -->|"writes program"| node_robot_program
node_jaculus -.->|"runs program"| node_robot_program
node_robot_program -->|"creates robot"| node_robot_factory
node_robot_program -->|"commands movement"| node_differential_drive
node_robot_factory -->|"extends drive"| node_differential_drive
node_differential_drive -->|"drives motors"| node_robot_hardware
node_robot_factory -->|"reads sensors"| node_robot_hardware
node_robot_factory -->|"starts monitoring"| node_battery_checker
node_battery_checker -->|"reads voltage"| node_battery_driver
node_battery_driver -->|"reads over I2C"| node_battery_ic
node_robot_program -->|"sets pen position"| node_servo
node_robot_program -->|"selects LED color"| node_color_utils
node_color_utils -->|"provides LED color"| node_smart_led

click node_robot_program "https://github.com/roboticsbrno/robutek/blob/main/robutekLibrary/src/example.ts"
click node_robot_factory "https://github.com/roboticsbrno/robutek/blob/main/robutekLibrary/src/libs/robutek.ts"
click node_differential_drive "https://github.com/roboticsbrno/robutek/blob/main/robutekLibrary/src/libs/differentialDrive.ts"
click node_battery_checker "https://github.com/roboticsbrno/robutek/blob/main/robutekLibrary/src/libs/batteryChecker.ts"
click node_battery_driver "https://github.com/roboticsbrno/robutek/blob/main/robutekLibrary/src/libs/bq2589.ts"
click node_servo "https://github.com/roboticsbrno/robutek/blob/main/robutekLibrary/src/libs/servo.ts"
click node_color_utils "https://github.com/roboticsbrno/robutek/blob/main/robutekLibrary/src/libs/colors.ts"
click node_color_sensor "https://github.com/roboticsbrno/robutek/blob/main/robutekLibrary/src/libs/zscs2016c.ts"
click node_distance_sensor "https://github.com/roboticsbrno/robutek/blob/main/robutekLibrary/src/libs/VL53L0X.ts"

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_robot_program,node_robot_factory,node_battery_checker,node_battery_driver toneBlue
class node_differential_drive toneAmber
class node_servo,node_color_utils,node_color_sensor,node_distance_sensor toneMint
class node_programmer,node_jaculus,node_robot_hardware,node_battery_ic,node_smart_led toneIndigo
```

## Components

### Robot runtime

- [Example robot program](https://github.com/roboticsbrno/robutek/blob/main/robutekLibrary/src/example.ts): `robutekLibrary/src/example.ts`
- [Robot factory](https://github.com/roboticsbrno/robutek/blob/main/robutekLibrary/src/libs/robutek.ts): `robutekLibrary/src/libs/robutek.ts`
- [Battery monitoring](https://github.com/roboticsbrno/robutek/blob/main/robutekLibrary/src/libs/batteryChecker.ts): `robutekLibrary/src/libs/batteryChecker.ts`
- [BQ2589 driver](https://github.com/roboticsbrno/robutek/blob/main/robutekLibrary/src/libs/bq2589.ts): `robutekLibrary/src/libs/bq2589.ts`

### Motion and sensing

- [Differential drive](https://github.com/roboticsbrno/robutek/blob/main/robutekLibrary/src/libs/differentialDrive.ts): `robutekLibrary/src/libs/differentialDrive.ts`

### Accessories

- [Servo control](https://github.com/roboticsbrno/robutek/blob/main/robutekLibrary/src/libs/servo.ts): `robutekLibrary/src/libs/servo.ts`
- [Color utilities](https://github.com/roboticsbrno/robutek/blob/main/robutekLibrary/src/libs/colors.ts): `robutekLibrary/src/libs/colors.ts`
- [RGB sensor driver](https://github.com/roboticsbrno/robutek/blob/main/robutekLibrary/src/libs/zscs2016c.ts): `robutekLibrary/src/libs/zscs2016c.ts`
- [Distance sensor driver](https://github.com/roboticsbrno/robutek/blob/main/robutekLibrary/src/libs/VL53L0X.ts): `robutekLibrary/src/libs/VL53L0X.ts`

### Other components

- **Robot programmer**
- **Jaculus runtime**
- **ESP32-S3 robot hardware**
- **Battery monitor IC**
- **Smart LED hardware**

## Connections

- Robot programmer → Example robot program: writes program (evidence: `robutekLibrary/src/example.ts`)
- Jaculus runtime → Example robot program: runs program
- Example robot program → Robot factory: creates robot (evidence: `robutekLibrary/src/example.ts`)
- Example robot program → Differential drive: commands movement (evidence: `robutekLibrary/src/example.ts`)
- Robot factory → Differential drive: extends drive (evidence: `robutekLibrary/src/libs/robutek.ts`)
- Differential drive → ESP32-S3 robot hardware: drives motors (evidence: `robutekLibrary/src/libs/differentialDrive.ts`)
- Robot factory → ESP32-S3 robot hardware: reads sensors (evidence: `robutekLibrary/src/libs/robutek.ts`)
- Robot factory → Battery monitoring: starts monitoring (evidence: `robutekLibrary/src/libs/robutek.ts`)
- Battery monitoring → BQ2589 driver: reads voltage (evidence: `robutekLibrary/src/libs/batteryChecker.ts`)
- BQ2589 driver → Battery monitor IC: reads over I2C (evidence: `robutekLibrary/src/libs/bq2589.ts`)
- Example robot program → Servo control: sets pen position (evidence: `robutekLibrary/src/example.ts`)
- Example robot program → Color utilities: selects LED color (evidence: `robutekLibrary/src/example.ts`)
- Color utilities → Smart LED hardware: provides LED color
