# freenove/freenove_big_hexapod_robot_kit_for_raspberry_pi architecture

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

- Interactive diagram: https://gitdiagram.com/freenove/freenove_big_hexapod_robot_kit_for_raspberry_pi
- Repository: https://github.com/freenove/freenove_big_hexapod_robot_kit_for_raspberry_pi

## Overview

This repository implements the Freenove Raspberry Pi hexapod kit: a desktop client sends movement and accessory commands to a robot-side server, which dispatches control to sensors and actuators; video and telemetry return to the client. The client also provides face, calibration, and LED interfaces. The source index supports the main module relationships, but many server internals and UI callbacks were not sampled, so those links are omitted where caller evidence is unavailable.

Main entry points: [`Code/Server/server.py`](https://github.com/freenove/freenove_big_hexapod_robot_kit_for_raspberry_pi/blob/master/Code/Server/server.py) (Command Server), [`Code/Client/Main.py`](https://github.com/freenove/freenove_big_hexapod_robot_kit_for_raspberry_pi/blob/master/Code/Client/Main.py) (Client App), [`Code/Client/Client.py`](https://github.com/freenove/freenove_big_hexapod_robot_kit_for_raspberry_pi/blob/master/Code/Client/Client.py) (Client Network), [`Code/Server/control.py`](https://github.com/freenove/freenove_big_hexapod_robot_kit_for_raspberry_pi/blob/master/Code/Server/control.py) (Gait Control)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Desktop Client"]
  node_clientapp["Client App<br/>[Main.py]"]
  node_clientui["Control UI<br/>[ui_client.py]"]
  node_clientnet["Client Network<br/>[Client.py]"]
  node_calibration["Calibration<br/>[Calibration.py]"]
  node_face["Face Features<br/>[Face.py]"]
  node_faceui["Face UI<br/>[ui_face.py]"]
  node_ledui["LED UI<br/>[ui_led.py]"]
end

subgraph group_robot["Robot Server"]
  node_serverapp["Server Launcher<br/>[main.py]"]
  node_server["Command Server<br/>[server.py]"]
  node_control["Gait Control<br/>[control.py]"]
end

subgraph group_hardware["Robot Hardware"]
  node_servo["Servo Control<br/>[servo.py]"]
  node_pca["PWM Expander<br/>[pca9685.py]"]
  node_imu["IMU Processing<br/>[imu.py]"]
  node_mpu["MPU6050 Driver<br/>[mpu6050.py]"]
  node_camera["Camera Capture<br/>[camera.py]"]
  node_sensors["Robot Sensors<br/>[adc.py]"]
  node_ultrasonic["Ultrasonic Sensor<br/>[ultrasonic.py]"]
  node_buzzer["Buzzer<br/>[buzzer.py]"]
  node_ledcontroller["LED Control<br/>[led.py]"]
end

subgraph group_ledstack["LED Driver"]
  node_rpled["Raspberry Pi LEDs<br/>[rpi_ledpixel.py]"]
  node_spiled["SPI LEDs<br/>[spi_ledpixel.py]"]
  node_wsdriver["WS281x Driver<br/>[ws2811.c]"]
end

node_operator(("Operator"))
node_tcp(("TCP Peer"))

node_operator -->|"operates"| node_clientapp
node_clientapp -->|"builds UI"| node_clientui
node_clientapp -->|"sends commands"| node_clientnet
node_clientapp -->|"uses calibration"| node_calibration
node_clientapp -->|"builds face UI"| node_faceui
node_clientapp -->|"builds LED UI"| node_ledui
node_clientapp -->|"uses recognition"| node_face
node_clientnet -->|"connects and sends"| node_tcp
node_serverapp -->|"starts server"| node_server
node_server -->|"serves commands"| node_tcp
node_server -->|"dispatches commands"| node_control
node_server -->|"requests frames"| node_camera
node_server -->|"dispatches LED commands"| node_ledcontroller
node_server -->|"reads battery"| node_sensors
node_server -->|"reads distance"| node_ultrasonic
node_server -->|"sets buzzer state"| node_buzzer
node_control -->|"commands servos"| node_servo
node_control -->|"reads attitude"| node_imu
node_servo -->|"uses PWM driver"| node_pca
node_imu -->|"reads sensor"| node_mpu
node_ledcontroller -->|"uses pixel driver"| node_rpled
node_ledcontroller -->|"uses SPI driver"| node_spiled
node_rpled -->|"uses WS281x"| node_wsdriver
node_clientnet -.->|"exchanges video and commands"| node_server

click node_clientapp "https://github.com/freenove/freenove_big_hexapod_robot_kit_for_raspberry_pi/blob/master/Code/Client/Main.py"
click node_clientui "https://github.com/freenove/freenove_big_hexapod_robot_kit_for_raspberry_pi/blob/master/Code/Client/ui_client.py"
click node_clientnet "https://github.com/freenove/freenove_big_hexapod_robot_kit_for_raspberry_pi/blob/master/Code/Client/Client.py"
click node_calibration "https://github.com/freenove/freenove_big_hexapod_robot_kit_for_raspberry_pi/blob/master/Code/Client/Calibration.py"
click node_face "https://github.com/freenove/freenove_big_hexapod_robot_kit_for_raspberry_pi/blob/master/Code/Client/Face.py"
click node_faceui "https://github.com/freenove/freenove_big_hexapod_robot_kit_for_raspberry_pi/blob/master/Code/Client/ui_face.py"
click node_ledui "https://github.com/freenove/freenove_big_hexapod_robot_kit_for_raspberry_pi/blob/master/Code/Client/ui_led.py"
click node_serverapp "https://github.com/freenove/freenove_big_hexapod_robot_kit_for_raspberry_pi/blob/master/Code/Server/main.py"
click node_server "https://github.com/freenove/freenove_big_hexapod_robot_kit_for_raspberry_pi/blob/master/Code/Server/server.py"
click node_control "https://github.com/freenove/freenove_big_hexapod_robot_kit_for_raspberry_pi/blob/master/Code/Server/control.py"
click node_servo "https://github.com/freenove/freenove_big_hexapod_robot_kit_for_raspberry_pi/blob/master/Code/Server/servo.py"
click node_pca "https://github.com/freenove/freenove_big_hexapod_robot_kit_for_raspberry_pi/blob/master/Code/Server/pca9685.py"
click node_imu "https://github.com/freenove/freenove_big_hexapod_robot_kit_for_raspberry_pi/blob/master/Code/Server/imu.py"
click node_mpu "https://github.com/freenove/freenove_big_hexapod_robot_kit_for_raspberry_pi/blob/master/Code/Libs/mpu6050/mpu6050/mpu6050.py"
click node_camera "https://github.com/freenove/freenove_big_hexapod_robot_kit_for_raspberry_pi/blob/master/Code/Server/camera.py"
click node_sensors "https://github.com/freenove/freenove_big_hexapod_robot_kit_for_raspberry_pi/blob/master/Code/Server/adc.py"
click node_ultrasonic "https://github.com/freenove/freenove_big_hexapod_robot_kit_for_raspberry_pi/blob/master/Code/Server/ultrasonic.py"
click node_buzzer "https://github.com/freenove/freenove_big_hexapod_robot_kit_for_raspberry_pi/blob/master/Code/Server/buzzer.py"
click node_ledcontroller "https://github.com/freenove/freenove_big_hexapod_robot_kit_for_raspberry_pi/blob/master/Code/Server/led.py"
click node_rpled "https://github.com/freenove/freenove_big_hexapod_robot_kit_for_raspberry_pi/blob/master/Code/Server/rpi_ledpixel.py"
click node_spiled "https://github.com/freenove/freenove_big_hexapod_robot_kit_for_raspberry_pi/blob/master/Code/Server/spi_ledpixel.py"
click node_wsdriver "https://github.com/freenove/freenove_big_hexapod_robot_kit_for_raspberry_pi/blob/master/Code/Libs/rpi-ws281x-python/library/lib/ws2811.c"

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_clientapp,node_clientui,node_clientnet,node_calibration,node_face,node_faceui,node_ledui toneBlue
class node_serverapp,node_server,node_control toneAmber
class node_servo,node_pca,node_imu,node_mpu,node_camera,node_sensors,node_ultrasonic,node_buzzer,node_ledcontroller toneMint
class node_rpled,node_spiled,node_wsdriver toneRose
class node_operator,node_tcp toneIndigo
```

## Components

### Desktop Client

- [Client App](https://github.com/freenove/freenove_big_hexapod_robot_kit_for_raspberry_pi/blob/master/Code/Client/Main.py): `Code/Client/Main.py`
- [Control UI](https://github.com/freenove/freenove_big_hexapod_robot_kit_for_raspberry_pi/blob/master/Code/Client/ui_client.py): `Code/Client/ui_client.py`
- [Client Network](https://github.com/freenove/freenove_big_hexapod_robot_kit_for_raspberry_pi/blob/master/Code/Client/Client.py): `Code/Client/Client.py`
- [Calibration](https://github.com/freenove/freenove_big_hexapod_robot_kit_for_raspberry_pi/blob/master/Code/Client/Calibration.py): `Code/Client/Calibration.py`
- [Face Features](https://github.com/freenove/freenove_big_hexapod_robot_kit_for_raspberry_pi/blob/master/Code/Client/Face.py): `Code/Client/Face.py`
- [Face UI](https://github.com/freenove/freenove_big_hexapod_robot_kit_for_raspberry_pi/blob/master/Code/Client/ui_face.py): `Code/Client/ui_face.py`
- [LED UI](https://github.com/freenove/freenove_big_hexapod_robot_kit_for_raspberry_pi/blob/master/Code/Client/ui_led.py): `Code/Client/ui_led.py`

### Robot Server

- [Server Launcher](https://github.com/freenove/freenove_big_hexapod_robot_kit_for_raspberry_pi/blob/master/Code/Server/main.py): `Code/Server/main.py`
- [Command Server](https://github.com/freenove/freenove_big_hexapod_robot_kit_for_raspberry_pi/blob/master/Code/Server/server.py): `Code/Server/server.py`
- [Gait Control](https://github.com/freenove/freenove_big_hexapod_robot_kit_for_raspberry_pi/blob/master/Code/Server/control.py): `Code/Server/control.py`

### Robot Hardware

- [Servo Control](https://github.com/freenove/freenove_big_hexapod_robot_kit_for_raspberry_pi/blob/master/Code/Server/servo.py): `Code/Server/servo.py`
- [PWM Expander](https://github.com/freenove/freenove_big_hexapod_robot_kit_for_raspberry_pi/blob/master/Code/Server/pca9685.py): `Code/Server/pca9685.py`
- [IMU Processing](https://github.com/freenove/freenove_big_hexapod_robot_kit_for_raspberry_pi/blob/master/Code/Server/imu.py): `Code/Server/imu.py`
- [MPU6050 Driver](https://github.com/freenove/freenove_big_hexapod_robot_kit_for_raspberry_pi/blob/master/Code/Libs/mpu6050/mpu6050/mpu6050.py): `Code/Libs/mpu6050/mpu6050/mpu6050.py`
- [Camera Capture](https://github.com/freenove/freenove_big_hexapod_robot_kit_for_raspberry_pi/blob/master/Code/Server/camera.py): `Code/Server/camera.py`
- [Robot Sensors](https://github.com/freenove/freenove_big_hexapod_robot_kit_for_raspberry_pi/blob/master/Code/Server/adc.py): `Code/Server/adc.py`
- [Ultrasonic Sensor](https://github.com/freenove/freenove_big_hexapod_robot_kit_for_raspberry_pi/blob/master/Code/Server/ultrasonic.py): `Code/Server/ultrasonic.py`
- [Buzzer](https://github.com/freenove/freenove_big_hexapod_robot_kit_for_raspberry_pi/blob/master/Code/Server/buzzer.py): `Code/Server/buzzer.py`
- [LED Control](https://github.com/freenove/freenove_big_hexapod_robot_kit_for_raspberry_pi/blob/master/Code/Server/led.py): `Code/Server/led.py`

### LED Driver

- [Raspberry Pi LEDs](https://github.com/freenove/freenove_big_hexapod_robot_kit_for_raspberry_pi/blob/master/Code/Server/rpi_ledpixel.py): `Code/Server/rpi_ledpixel.py`
- [SPI LEDs](https://github.com/freenove/freenove_big_hexapod_robot_kit_for_raspberry_pi/blob/master/Code/Server/spi_ledpixel.py): `Code/Server/spi_ledpixel.py`
- [WS281x Driver](https://github.com/freenove/freenove_big_hexapod_robot_kit_for_raspberry_pi/blob/master/Code/Libs/rpi-ws281x-python/library/lib/ws2811.c): `Code/Libs/rpi-ws281x-python/library/lib/ws2811.c`

### Other components

- **Operator**
- **TCP Peer**

## Connections

- Operator → Client App: operates (evidence: `Code/Client/Main.py`)
- Client App → Control UI: builds UI (evidence: `Code/Client/Main.py`)
- Client App → Client Network: sends commands (evidence: `Code/Client/Main.py`)
- Client App → Calibration: uses calibration (evidence: `Code/Client/Main.py`)
- Client App → Face UI: builds face UI (evidence: `Code/Client/Main.py`)
- Client App → LED UI: builds LED UI (evidence: `Code/Client/Main.py`)
- Client App → Face Features: uses recognition
- Client Network → TCP Peer: connects and sends (evidence: `Code/Client/Client.py`)
- Server Launcher → Command Server: starts server (evidence: `Code/Server/main.py`)
- Command Server → TCP Peer: serves commands (evidence: `Code/Server/server.py`)
- Command Server → Gait Control: dispatches commands (evidence: `Code/Server/server.py`)
- Command Server → Camera Capture: requests frames (evidence: `Code/Server/server.py`)
- Command Server → LED Control: dispatches LED commands (evidence: `Code/Server/server.py`)
- Command Server → Robot Sensors: reads battery (evidence: `Code/Server/server.py`)
- Command Server → Ultrasonic Sensor: reads distance (evidence: `Code/Server/server.py`)
- Command Server → Buzzer: sets buzzer state (evidence: `Code/Server/server.py`)
- Gait Control → Servo Control: commands servos (evidence: `Code/Server/control.py`)
- Gait Control → IMU Processing: reads attitude (evidence: `Code/Server/control.py`)
- Servo Control → PWM Expander: uses PWM driver (evidence: `Code/Server/servo.py`)
- IMU Processing → MPU6050 Driver: reads sensor (evidence: `Code/Server/imu.py`)
- LED Control → Raspberry Pi LEDs: uses pixel driver (evidence: `Code/Server/led.py`)
- LED Control → SPI LEDs: uses SPI driver (evidence: `Code/Server/led.py`)
- Raspberry Pi LEDs → WS281x Driver: uses WS281x (evidence: `Code/Server/rpi_ledpixel.py`)
- Client Network → Command Server: exchanges video and commands
