# jaga512/myosa architecture

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

- Interactive diagram: https://gitdiagram.com/jaga512/myosa
- Repository: https://github.com/jaga512/myosa

## Overview

RIVAL/CIRCADIA-SENSE is an ESP32-based adaptive lighting product. Its documented user-to-result flow is environmental and motion sensing, activity/context interpretation, then circadian-aware lighting adjustment; energy optimization and multi-zone control shape that result. The README also describes gesture interaction, status display, and wireless monitoring/control. Only the firmware file is present in the tree, and no source excerpts were supplied, so subsystem boundaries and implementation details are documented capabilities rather than inspected code structure.

Main entry points: [`circadia_sense_v3.ino`](https://github.com/jaga512/myosa/blob/main/circadia_sense_v3.ino) (Adaptive Lighting)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_sensing["Sensing &amp; Interaction"]
  node_sensors["Environment &amp; Motion Sensors"]
  node_gesture["Gesture Input"]
end

subgraph group_decision["Lighting Intelligence"]
  node_activity["Activity Recognition"]
  node_circadian["Circadian Scheduling"]
  node_energy["Energy Optimization"]
end

subgraph group_actuation["Lighting Control"]
  node_lighting["Adaptive Lighting"]
  node_zones["Four Lighting Zones"]
  node_lights["RGB LED Lighting"]
end

subgraph group_connectivity["Connectivity &amp; Status"]
  node_wireless["Wi-Fi &amp; Bluetooth"]
  node_cloud["Cloud Sync"]
  node_display["OLED Status Display"]
end

node_user(("Occupant"))
node_dashboard(("Remote Monitoring"))

node_sensors -->|"inform context"| node_activity
node_activity -->|"select activity mode"| node_lighting
node_circadian -->|"adjust spectrum"| node_lighting
node_energy -->|"optimize brightness"| node_lighting
node_gesture -->|"control lighting"| node_lighting
node_lighting -->|"manage independently"| node_zones
node_zones -->|"control zones"| node_lights
node_user -->|"gesture input"| node_gesture
node_wireless -->|"enable monitoring"| node_dashboard
node_wireless -->|"sync preferences"| node_cloud
node_sensors -->|"show system data"| node_display

click node_sensors "https://github.com/jaga512/myosa/blob/main/circadia_sense_v3.ino"
click node_gesture "https://github.com/jaga512/myosa/blob/main/circadia_sense_v3.ino"
click node_activity "https://github.com/jaga512/myosa/blob/main/circadia_sense_v3.ino"
click node_circadian "https://github.com/jaga512/myosa/blob/main/circadia_sense_v3.ino"
click node_energy "https://github.com/jaga512/myosa/blob/main/circadia_sense_v3.ino"
click node_lighting "https://github.com/jaga512/myosa/blob/main/circadia_sense_v3.ino"
click node_zones "https://github.com/jaga512/myosa/blob/main/circadia_sense_v3.ino"
click node_wireless "https://github.com/jaga512/myosa/blob/main/circadia_sense_v3.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_sensors,node_gesture toneBlue
class node_activity,node_circadian,node_energy toneAmber
class node_lighting,node_zones,node_lights toneMint
class node_wireless,node_cloud,node_display toneRose
class node_user,node_dashboard toneIndigo
```

## Components

### Sensing & Interaction

- [Environment & Motion Sensors](https://github.com/jaga512/myosa/blob/main/circadia_sense_v3.ino): `circadia_sense_v3.ino`
- [Gesture Input](https://github.com/jaga512/myosa/blob/main/circadia_sense_v3.ino): `circadia_sense_v3.ino`

### Lighting Intelligence

- [Activity Recognition](https://github.com/jaga512/myosa/blob/main/circadia_sense_v3.ino): `circadia_sense_v3.ino`
- [Circadian Scheduling](https://github.com/jaga512/myosa/blob/main/circadia_sense_v3.ino): `circadia_sense_v3.ino`
- [Energy Optimization](https://github.com/jaga512/myosa/blob/main/circadia_sense_v3.ino): `circadia_sense_v3.ino`

### Lighting Control

- [Adaptive Lighting](https://github.com/jaga512/myosa/blob/main/circadia_sense_v3.ino): `circadia_sense_v3.ino`
- [Four Lighting Zones](https://github.com/jaga512/myosa/blob/main/circadia_sense_v3.ino): `circadia_sense_v3.ino`
- **RGB LED Lighting**

### Connectivity & Status

- [Wi-Fi & Bluetooth](https://github.com/jaga512/myosa/blob/main/circadia_sense_v3.ino): `circadia_sense_v3.ino`
- **Cloud Sync**
- **OLED Status Display**

### Other components

- **Occupant**
- **Remote Monitoring**

## Connections

- Environment & Motion Sensors → Activity Recognition: inform context (evidence: `README.md`)
- Activity Recognition → Adaptive Lighting: select activity mode (evidence: `README.md`)
- Circadian Scheduling → Adaptive Lighting: adjust spectrum (evidence: `README.md`)
- Energy Optimization → Adaptive Lighting: optimize brightness (evidence: `README.md`)
- Gesture Input → Adaptive Lighting: control lighting (evidence: `README.md`)
- Adaptive Lighting → Four Lighting Zones: manage independently (evidence: `README.md`)
- Four Lighting Zones → RGB LED Lighting: control zones (evidence: `README.md`)
- Occupant → Gesture Input: gesture input (evidence: `README.md`)
- Wi-Fi & Bluetooth → Remote Monitoring: enable monitoring (evidence: `README.md`)
- Wi-Fi & Bluetooth → Cloud Sync: sync preferences (evidence: `README.md`)
- Environment & Motion Sensors → OLED Status Display: show system data (evidence: `README.md`)
