# gaudilabs/opendrop architecture

> Architecture diagram of the GitHub repository gaudilabs/opendrop, 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/gaudilabs/opendrop
- Repository: https://github.com/gaudilabs/opendrop

## Overview

OpenDrop is an open-source digital microfluidics platform: firmware coordinates droplet movement across electrodes, with feedback and a display interface. The tree contains several hardware generations; sampled V2 beta and V3 code shows electrode driving, pad feedback, and visualization, while V4 adds flash-storage support. The display, graphics, and audio libraries are supporting runtime capabilities. Several links are based on the SOURCE INDEX or README rather than complete source excerpts; unsampled V4 behavior is represented conservatively.

Main entry points: [`OpenDropV3/Software/Libraries/OpenDrop/OpenDrop.cpp`](https://github.com/gaudilabs/opendrop/blob/master/OpenDropV3/Software/Libraries/OpenDrop/OpenDrop.cpp) (V3 control), [`OpenDropV3/Software/Libraries/Adafruit-GFX-Library/Adafruit_GFX.cpp`](https://github.com/gaudilabs/opendrop/blob/master/OpenDropV3/Software/Libraries/Adafruit-GFX-Library/Adafruit_GFX.cpp) (Graphics primitives), [`OpenDropV2/OpenDropperV25_beta/OpenDropII/OpenDropII.cpp`](https://github.com/gaudilabs/opendrop/blob/master/OpenDropV2/OpenDropperV25_beta/OpenDropII/OpenDropII.cpp) (V2 beta control), [`OpenDropV3/Software/Libraries/Adafruit_SSD1306/Adafruit_SSD1306.cpp`](https://github.com/gaudilabs/opendrop/blob/master/OpenDropV3/Software/Libraries/Adafruit_SSD1306/Adafruit_SSD1306.cpp) (SSD1306 display)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_firmware["OpenDrop firmware"]
  node_v2_base["V2 library<br/>[OpenDrop.cpp]"]
  node_v2beta["V2 beta control<br/>[OpenDropII.cpp]"]
  node_v3control["V3 control<br/>[OpenDrop.cpp]"]
  node_v4control["V4 control<br/>[OpenDrop.cpp]"]
end

subgraph group_hardware["Electrode hardware"]
  node_electrode_driver["Electrode driving<br/>[OpenDrop.cpp]"]
  node_pad_feedback["Pad feedback<br/>[OpenDropII.cpp]"]
  node_hardware_config["Hardware configuration<br/>[hardware_def.h]"]
  node_v2_hardware_config["V2 beta configuration<br/>[hardware_def.h]"]
end

subgraph group_display["Display stack"]
  node_gfx["Graphics primitives<br/>[Adafruit_GFX.cpp]"]
  node_fonts["Font assets"]
  node_font_format["Font format<br/>[gfxfont.h]"]
  node_oled["SSD1306 display"]
  node_ssd_bus["Display bus I/O"]
end

subgraph group_support["Runtime support"]
  node_audio["Audio playback<br/>[OpenDropAudio.cpp]"]
  node_audio_assets["Audio assets<br/>[Sound2.h]"]
  node_flash[("Flash storage<br/>[FlashStorage.cpp]")]
end

node_researcher(("Researcher"))
node_droplet_process(("Droplet process"))

node_researcher -.->|"operates"| node_v3control
node_droplet_process -.->|"automates"| node_v3control
node_v2beta -->|"reads feedback"| node_pad_feedback
node_v2beta -.->|"configures hardware"| node_hardware_config
node_v2beta -->|"draws interface"| node_gfx
node_v3control -->|"drives electrodes"| node_electrode_driver
node_v3control -->|"uses configuration"| node_hardware_config
node_v3control -->|"draws interface"| node_gfx
node_gfx -->|"uses font data"| node_font_format
node_gfx -.->|"renders glyphs"| node_fonts
node_oled -->|"implements display graphics"| node_gfx
node_audio -.->|"plays samples"| node_audio_assets
node_v4control -.->|"uses storage"| node_flash
node_oled -.->|"uses bus I/O"| node_ssd_bus

click node_v2_base "https://github.com/gaudilabs/opendrop/blob/master/OpenDropV2/OpenDropperV2/OpenDrop_library/OpenDrop.cpp"
click node_v2beta "https://github.com/gaudilabs/opendrop/blob/master/OpenDropV2/OpenDropperV25_beta/OpenDropII/OpenDropII.cpp"
click node_v3control "https://github.com/gaudilabs/opendrop/blob/master/OpenDropV3/Software/Libraries/OpenDrop/OpenDrop.cpp"
click node_v4control "https://github.com/gaudilabs/opendrop/blob/master/OpenDropV4/Software/Libraries/OpenDrop/OpenDrop.cpp"
click node_electrode_driver "https://github.com/gaudilabs/opendrop/blob/master/OpenDropV3/Software/Libraries/OpenDrop/OpenDrop.cpp"
click node_pad_feedback "https://github.com/gaudilabs/opendrop/blob/master/OpenDropV2/OpenDropperV25_beta/OpenDropII/OpenDropII.cpp"
click node_hardware_config "https://github.com/gaudilabs/opendrop/blob/master/OpenDropV3/Software/Libraries/OpenDrop/hardware_def.h"
click node_v2_hardware_config "https://github.com/gaudilabs/opendrop/blob/master/OpenDropV2/OpenDropperV25_beta/OpenDropII/hardware_def.h"
click node_gfx "https://github.com/gaudilabs/opendrop/blob/master/OpenDropV3/Software/Libraries/Adafruit-GFX-Library/Adafruit_GFX.cpp"
click node_fonts "https://github.com/gaudilabs/opendrop/blob/master/OpenDropV3/Software/Libraries/Adafruit-GFX-Library/Fonts/FreeSansBoldOblique24pt7b.h"
click node_font_format "https://github.com/gaudilabs/opendrop/blob/master/OpenDropV3/Software/Libraries/Adafruit-GFX-Library/gfxfont.h"
click node_oled "https://github.com/gaudilabs/opendrop/blob/master/OpenDropV3/Software/Libraries/Adafruit_SSD1306/Adafruit_SSD1306.cpp"
click node_audio "https://github.com/gaudilabs/opendrop/blob/master/OpenDropV3/Software/Libraries/OpenDropAudio/src/OpenDropAudio.cpp"
click node_audio_assets "https://github.com/gaudilabs/opendrop/blob/master/OpenDropV3/Software/Libraries/OpenDropAudio/src/Sound2.h"
click node_flash "https://github.com/gaudilabs/opendrop/blob/master/OpenDropV4/Software/Libraries/OpenDrop/FlashStorage.cpp"
click node_ssd_bus "https://github.com/gaudilabs/opendrop/blob/master/OpenDropV4/Software/Libraries/Adafruit_BusIO/Adafruit_I2CDevice.cpp"

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_v2_base,node_v2beta,node_v3control,node_v4control toneBlue
class node_electrode_driver,node_pad_feedback,node_hardware_config,node_v2_hardware_config toneAmber
class node_gfx,node_fonts,node_font_format,node_oled,node_ssd_bus toneMint
class node_audio,node_audio_assets,node_flash toneRose
class node_researcher,node_droplet_process toneIndigo
```

## Components

### OpenDrop firmware

- [V2 library](https://github.com/gaudilabs/opendrop/blob/master/OpenDropV2/OpenDropperV2/OpenDrop_library/OpenDrop.cpp): `OpenDropV2/OpenDropperV2/OpenDrop_library/OpenDrop.cpp`
- [V2 beta control](https://github.com/gaudilabs/opendrop/blob/master/OpenDropV2/OpenDropperV25_beta/OpenDropII/OpenDropII.cpp): `OpenDropV2/OpenDropperV25_beta/OpenDropII/OpenDropII.cpp`
- [V3 control](https://github.com/gaudilabs/opendrop/blob/master/OpenDropV3/Software/Libraries/OpenDrop/OpenDrop.cpp): `OpenDropV3/Software/Libraries/OpenDrop/OpenDrop.cpp`
- [V4 control](https://github.com/gaudilabs/opendrop/blob/master/OpenDropV4/Software/Libraries/OpenDrop/OpenDrop.cpp): `OpenDropV4/Software/Libraries/OpenDrop/OpenDrop.cpp`

### Electrode hardware

- [Electrode driving](https://github.com/gaudilabs/opendrop/blob/master/OpenDropV3/Software/Libraries/OpenDrop/OpenDrop.cpp): `OpenDropV3/Software/Libraries/OpenDrop/OpenDrop.cpp`
- [Pad feedback](https://github.com/gaudilabs/opendrop/blob/master/OpenDropV2/OpenDropperV25_beta/OpenDropII/OpenDropII.cpp): `OpenDropV2/OpenDropperV25_beta/OpenDropII/OpenDropII.cpp`
- [Hardware configuration](https://github.com/gaudilabs/opendrop/blob/master/OpenDropV3/Software/Libraries/OpenDrop/hardware_def.h): `OpenDropV3/Software/Libraries/OpenDrop/hardware_def.h`
- [V2 beta configuration](https://github.com/gaudilabs/opendrop/blob/master/OpenDropV2/OpenDropperV25_beta/OpenDropII/hardware_def.h): `OpenDropV2/OpenDropperV25_beta/OpenDropII/hardware_def.h`

### Display stack

- [Graphics primitives](https://github.com/gaudilabs/opendrop/blob/master/OpenDropV3/Software/Libraries/Adafruit-GFX-Library/Adafruit_GFX.cpp): `OpenDropV3/Software/Libraries/Adafruit-GFX-Library/Adafruit_GFX.cpp`
- [Font assets](https://github.com/gaudilabs/opendrop/blob/master/OpenDropV3/Software/Libraries/Adafruit-GFX-Library/Fonts/FreeSansBoldOblique24pt7b.h): `OpenDropV3/Software/Libraries/Adafruit-GFX-Library/Fonts/FreeSansBoldOblique24pt7b.h`
- [Font format](https://github.com/gaudilabs/opendrop/blob/master/OpenDropV3/Software/Libraries/Adafruit-GFX-Library/gfxfont.h): `OpenDropV3/Software/Libraries/Adafruit-GFX-Library/gfxfont.h`
- [SSD1306 display](https://github.com/gaudilabs/opendrop/blob/master/OpenDropV3/Software/Libraries/Adafruit_SSD1306/Adafruit_SSD1306.cpp): `OpenDropV3/Software/Libraries/Adafruit_SSD1306/Adafruit_SSD1306.cpp`
- [Display bus I/O](https://github.com/gaudilabs/opendrop/blob/master/OpenDropV4/Software/Libraries/Adafruit_BusIO/Adafruit_I2CDevice.cpp): `OpenDropV4/Software/Libraries/Adafruit_BusIO/Adafruit_I2CDevice.cpp`

### Runtime support

- [Audio playback](https://github.com/gaudilabs/opendrop/blob/master/OpenDropV3/Software/Libraries/OpenDropAudio/src/OpenDropAudio.cpp): `OpenDropV3/Software/Libraries/OpenDropAudio/src/OpenDropAudio.cpp`
- [Audio assets](https://github.com/gaudilabs/opendrop/blob/master/OpenDropV3/Software/Libraries/OpenDropAudio/src/Sound2.h): `OpenDropV3/Software/Libraries/OpenDropAudio/src/Sound2.h`
- [Flash storage](https://github.com/gaudilabs/opendrop/blob/master/OpenDropV4/Software/Libraries/OpenDrop/FlashStorage.cpp): `OpenDropV4/Software/Libraries/OpenDrop/FlashStorage.cpp`

### Other components

- **Researcher**
- **Droplet process**

## Connections

- Researcher → V3 control: operates
- Droplet process → V3 control: automates
- V2 beta control → Pad feedback: reads feedback (evidence: `OpenDropV2/OpenDropperV25_beta/OpenDropII/OpenDropII.cpp`)
- V2 beta control → Hardware configuration: configures hardware
- V2 beta control → Graphics primitives: draws interface (evidence: `OpenDropV2/OpenDropperV25_beta/OpenDropII/OpenDropII.cpp`)
- V3 control → Electrode driving: drives electrodes (evidence: `OpenDropV3/Software/Libraries/OpenDrop/OpenDrop.cpp`)
- V3 control → Hardware configuration: uses configuration (evidence: `OpenDropV3/Software/Libraries/OpenDrop/OpenDrop.cpp`)
- V3 control → Graphics primitives: draws interface (evidence: `OpenDropV3/Software/Libraries/OpenDrop/OpenDrop.cpp`)
- Graphics primitives → Font format: uses font data
- Graphics primitives → Font assets: renders glyphs
- SSD1306 display → Graphics primitives: implements display graphics (evidence: `OpenDropV3/Software/Libraries/Adafruit_SSD1306/Adafruit_SSD1306.cpp`)
- Audio playback → Audio assets: plays samples
- V4 control → Flash storage: uses storage
- SSD1306 display → Display bus I/O: uses bus I/O
