# namanpahariya2009/air-mouse architecture

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

- Interactive diagram: https://gitdiagram.com/namanpahariya2009/air-mouse
- Repository: https://github.com/namanpahariya2009/air-mouse

## Overview

This is a compact ESP32 firmware project: hand motion and button presses become standard BLE mouse input for a paired host. The README documents the hardware, gyro-to-cursor mapping, filtering, sensitivity behavior, and HID pairing. No source excerpts were provided, so the internal stages and their connections below reflect documented behavior rather than inspected implementation details.

Main entry points: [`Air_Mouse.ino`](https://github.com/namanpahariya2009/air-mouse/blob/main/Air_Mouse.ino) (BLE Mouse HID)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_user(("User"))
node_gyro["MPU6050 Gyroscope"]
node_buttons["Control Buttons"]
node_motion["Motion Processing<br/>[Air_Mouse.ino]"]
node_hid["BLE Mouse HID<br/>[Air_Mouse.ino]"]
node_host["Paired Host"]

node_user -->|"moves device"| node_gyro
node_gyro -->|"provides gyro data"| node_motion
node_user -->|"presses controls"| node_buttons
node_buttons -->|"requests clicks/scrolls"| node_hid
node_motion -->|"maps cursor motion"| node_hid
node_hid -->|"sends BLE HID"| node_host

click node_motion "https://github.com/namanpahariya2009/air-mouse/blob/main/Air_Mouse.ino"
click node_hid "https://github.com/namanpahariya2009/air-mouse/blob/main/Air_Mouse.ino"

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_user toneBlue
class node_gyro,node_buttons,node_host toneIndigo
class node_motion,node_hid toneTeal
```

## Components

### Other components

- **User**
- **MPU6050 Gyroscope**
- **Control Buttons**
- [Motion Processing](https://github.com/namanpahariya2009/air-mouse/blob/main/Air_Mouse.ino): `Air_Mouse.ino`
- [BLE Mouse HID](https://github.com/namanpahariya2009/air-mouse/blob/main/Air_Mouse.ino): `Air_Mouse.ino`
- **Paired Host**

## Connections

- User → MPU6050 Gyroscope: moves device (evidence: `README.md`)
- MPU6050 Gyroscope → Motion Processing: provides gyro data (evidence: `README.md`)
- User → Control Buttons: presses controls (evidence: `README.md`)
- Control Buttons → BLE Mouse HID: requests clicks/scrolls (evidence: `README.md`)
- Motion Processing → BLE Mouse HID: maps cursor motion (evidence: `README.md`)
- BLE Mouse HID → Paired Host: sends BLE HID (evidence: `README.md`)
