# themmegot/nano-ruuvi architecture

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

- Interactive diagram: https://gitdiagram.com/themmegot/nano-ruuvi
- Repository: https://github.com/themmegot/nano-ruuvi

## Overview

This small Arduino firmware reads the Nano 33 BLE Sense rev1 sensors and broadcasts their readings as Ruuvi RAWv2 BLE advertisements every 1.285 seconds. Ruuvi Station and Victron Cerbo GX/VRM are documented compatible receivers. The source was not available, so the graph reflects README-documented behavior only.

Main entry points: [`nano-ruuvi.ino`](https://github.com/themmegot/nano-ruuvi/blob/main/nano-ruuvi.ino) (Ruuvi emulator)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_firmware["Firmware"]
  node_firmware["Ruuvi emulator<br/>[nano-ruuvi.ino]"]
  node_ble["RAWv2 BLE ads<br/>[nano-ruuvi.ino]"]
end

node_hts221["HTS221 sensor"]
node_lps22hb["LPS22HB sensor"]
node_lsm9ds1["LSM9DS1 sensor"]
node_ruuvi(("Ruuvi Station"))
node_cerbo(("Victron Cerbo GX"))
node_vrm(("VRM portal"))

node_firmware -->|"reads temperature/humidity"| node_hts221
node_firmware -->|"reads pressure"| node_lps22hb
node_firmware -->|"reads movement count"| node_lsm9ds1
node_firmware -->|"broadcasts every 1.285 s"| node_ble
node_ble -->|"advertises to"| node_ruuvi
node_ble -->|"advertises to"| node_cerbo
node_ble -->|"advertises to"| node_vrm

click node_firmware "https://github.com/themmegot/nano-ruuvi/blob/main/nano-ruuvi.ino"
click node_ble "https://github.com/themmegot/nano-ruuvi/blob/main/nano-ruuvi.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_firmware,node_ble toneBlue
class node_hts221,node_lps22hb,node_lsm9ds1,node_ruuvi,node_cerbo,node_vrm toneIndigo
```

## Components

### Firmware

- [Ruuvi emulator](https://github.com/themmegot/nano-ruuvi/blob/main/nano-ruuvi.ino): `nano-ruuvi.ino`
- [RAWv2 BLE ads](https://github.com/themmegot/nano-ruuvi/blob/main/nano-ruuvi.ino): `nano-ruuvi.ino`

### Other components

- **HTS221 sensor**
- **LPS22HB sensor**
- **LSM9DS1 sensor**
- **Ruuvi Station**
- **Victron Cerbo GX**
- **VRM portal**

## Connections

- Ruuvi emulator → HTS221 sensor: reads temperature/humidity
- Ruuvi emulator → LPS22HB sensor: reads pressure
- Ruuvi emulator → LSM9DS1 sensor: reads movement count
- Ruuvi emulator → RAWv2 BLE ads: broadcasts every 1.285 s
- RAWv2 BLE ads → Ruuvi Station: advertises to
- RAWv2 BLE ads → Victron Cerbo GX: advertises to
- RAWv2 BLE ads → VRM portal: advertises to
