# ddegonge/nerf_aimbot architecture

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

- Interactive diagram: https://gitdiagram.com/ddegonge/nerf_aimbot
- Repository: https://github.com/ddegonge/nerf_aimbot

## Overview

Nerf_Aimbot combines a Python vision-and-aiming controller, Feather microcontroller firmware, and mechanical CAD for an aiming/triggering device. The documented workflow is sparse, so the main runtime flow is based on the sampled Python entry point and module excerpts. CAD assemblies and firmware behavior are represented as subsystems, but their internal relationships are not inferred from filenames alone.

Main entry points: [`Python/Main.py`](https://github.com/ddegonge/nerf_aimbot/blob/master/Python/Main.py) (Runtime entry), [`Python/Modes.py`](https://github.com/ddegonge/nerf_aimbot/blob/master/Python/Modes.py) (Aim modes), [`Python/Config.py`](https://github.com/ddegonge/nerf_aimbot/blob/master/Python/Config.py) (Runtime parameters), [`Python/CameraDriver.py`](https://github.com/ddegonge/nerf_aimbot/blob/master/Python/CameraDriver.py) (Camera tracking)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_aiming["Aiming application"]
  node_main["Runtime entry<br/>[Main.py]"]
  node_camera["Camera tracking<br/>[CameraDriver.py]"]
  node_modes["Aim modes<br/>[Modes.py]"]
  node_motor["Motion control<br/>[MotorDriver.py]"]
  node_serial["Serial transport<br/>[SerialDevice.py]"]
  node_config["Runtime parameters<br/>[Config.py]"]
end

subgraph group_firmware["Feather firmware"]
  node_feather["Firmware control<br/>[nerfy.h]"]
  node_firmware_helpers["Serial and parsing declarations<br/>[funks.h]"]
  node_firmware_pins["Hardware pin map<br/>[pins.h]"]
end

subgraph group_mechanical["Mechanical design"]
  node_cad_esper["ESPER components"]
  node_cad_assemblies["CAD assemblies and mounts"]
end

subgraph group_media["Image utilities"]
  node_image_video["Frame-to-video utility<br/>[ImageToVid.py]"]
end

node_operator(("Operator"))
node_camera_hw(("Camera"))
node_controls(("Buttons and laser"))

node_operator -->|"starts"| node_main
node_main -->|"starts camera"| node_camera
node_main -->|"creates transport"| node_serial
node_main -->|"creates controller"| node_motor
node_main -->|"dispatches mode"| node_modes
node_main -->|"reads settings"| node_config
node_camera -->|"captures frames"| node_camera_hw
node_modes -->|"tracks target"| node_camera
node_modes -->|"updates aim"| node_motor
node_modes -->|"reads and drives"| node_controls
node_motor -->|"sends commands"| node_serial
node_camera -->|"reads settings"| node_config
node_modes -->|"reads settings"| node_config
node_motor -->|"reads settings"| node_config
node_serial -->|"reads settings"| node_config
node_feather -->|"includes"| node_firmware_helpers
node_feather -->|"includes"| node_firmware_pins

click node_main "https://github.com/ddegonge/nerf_aimbot/blob/master/Python/Main.py"
click node_camera "https://github.com/ddegonge/nerf_aimbot/blob/master/Python/CameraDriver.py"
click node_modes "https://github.com/ddegonge/nerf_aimbot/blob/master/Python/Modes.py"
click node_motor "https://github.com/ddegonge/nerf_aimbot/blob/master/Python/MotorDriver.py"
click node_serial "https://github.com/ddegonge/nerf_aimbot/blob/master/Python/SerialDevice.py"
click node_config "https://github.com/ddegonge/nerf_aimbot/blob/master/Python/Config.py"
click node_feather "https://github.com/ddegonge/nerf_aimbot/blob/master/FeatherFW/nerfy.h"
click node_firmware_helpers "https://github.com/ddegonge/nerf_aimbot/blob/master/FeatherFW/funks.h"
click node_firmware_pins "https://github.com/ddegonge/nerf_aimbot/blob/master/FeatherFW/pins.h"
click node_cad_esper "https://github.com/ddegonge/nerf_aimbot/tree/master/ESPER"
click node_cad_assemblies "https://github.com/ddegonge/nerf_aimbot/tree/master/Cad"
click node_image_video "https://github.com/ddegonge/nerf_aimbot/blob/master/Python/ImageToVid.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_camera,node_modes,node_motor,node_serial,node_config toneBlue
class node_feather,node_firmware_helpers,node_firmware_pins toneAmber
class node_cad_esper,node_cad_assemblies toneMint
class node_image_video toneRose
class node_operator,node_camera_hw,node_controls toneIndigo
```

## Components

### Aiming application

- [Runtime entry](https://github.com/ddegonge/nerf_aimbot/blob/master/Python/Main.py): `Python/Main.py`
- [Camera tracking](https://github.com/ddegonge/nerf_aimbot/blob/master/Python/CameraDriver.py): `Python/CameraDriver.py`
- [Aim modes](https://github.com/ddegonge/nerf_aimbot/blob/master/Python/Modes.py): `Python/Modes.py`
- [Motion control](https://github.com/ddegonge/nerf_aimbot/blob/master/Python/MotorDriver.py): `Python/MotorDriver.py`
- [Serial transport](https://github.com/ddegonge/nerf_aimbot/blob/master/Python/SerialDevice.py): `Python/SerialDevice.py`
- [Runtime parameters](https://github.com/ddegonge/nerf_aimbot/blob/master/Python/Config.py): `Python/Config.py`

### Feather firmware

- [Firmware control](https://github.com/ddegonge/nerf_aimbot/blob/master/FeatherFW/nerfy.h): `FeatherFW/nerfy.h`
- [Serial and parsing declarations](https://github.com/ddegonge/nerf_aimbot/blob/master/FeatherFW/funks.h): `FeatherFW/funks.h`
- [Hardware pin map](https://github.com/ddegonge/nerf_aimbot/blob/master/FeatherFW/pins.h): `FeatherFW/pins.h`

### Mechanical design

- [ESPER components](https://github.com/ddegonge/nerf_aimbot/tree/master/ESPER): `ESPER`
- [CAD assemblies and mounts](https://github.com/ddegonge/nerf_aimbot/tree/master/Cad): `Cad`

### Image utilities

- [Frame-to-video utility](https://github.com/ddegonge/nerf_aimbot/blob/master/Python/ImageToVid.py): `Python/ImageToVid.py`

### Other components

- **Operator**
- **Camera**
- **Buttons and laser**

## Connections

- Operator → Runtime entry: starts (evidence: `Python/Main.py`)
- Runtime entry → Camera tracking: starts camera (evidence: `Python/Main.py`)
- Runtime entry → Serial transport: creates transport (evidence: `Python/Main.py`)
- Runtime entry → Motion control: creates controller (evidence: `Python/Main.py`)
- Runtime entry → Aim modes: dispatches mode (evidence: `Python/Main.py`)
- Runtime entry → Runtime parameters: reads settings (evidence: `Python/Main.py`)
- Camera tracking → Camera: captures frames (evidence: `Python/CameraDriver.py`)
- Aim modes → Camera tracking: tracks target (evidence: `Python/Modes.py`)
- Aim modes → Motion control: updates aim (evidence: `Python/Modes.py`)
- Aim modes → Buttons and laser: reads and drives (evidence: `Python/Modes.py`)
- Motion control → Serial transport: sends commands (evidence: `Python/MotorDriver.py`)
- Camera tracking → Runtime parameters: reads settings (evidence: `Python/CameraDriver.py`)
- Aim modes → Runtime parameters: reads settings (evidence: `Python/Modes.py`)
- Motion control → Runtime parameters: reads settings (evidence: `Python/MotorDriver.py`)
- Serial transport → Runtime parameters: reads settings (evidence: `Python/SerialDevice.py`)
- Firmware control → Serial and parsing declarations: includes (evidence: `FeatherFW/nerfy.h`)
- Firmware control → Hardware pin map: includes (evidence: `FeatherFW/nerfy.h`)
