# niklashammerstone/galvostep architecture

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

- Interactive diagram: https://gitdiagram.com/niklashammerstone/galvostep
- Repository: https://github.com/niklashammerstone/galvostep

## Overview

GalvoStep is an open hardware laser-engraving project. Its software workflow is to turn a picture into G-code, select a serial-connected machine, and stream commands while displaying machine responses. The repository also contains separate V0 Python tooling and V0/V1 firmware, plus mechanical designs and project documentation. The graph preserves those product branches; firmware internals and the GUI's image-processing details are only partly evidenced by the supplied excerpts.

Main entry points: [`Codes/GUI_code/src/main/java/MainGUI.java`](https://github.com/niklashammerstone/galvostep/blob/master/Codes/GUI_code/src/main/java/MainGUI.java) (Control GUI), [`Codes/GalvoV0_Code/Gcode_handler.py`](https://github.com/niklashammerstone/galvostep/blob/master/Codes/GalvoV0_Code/Gcode_handler.py) (V0 serial sender), [`Codes/GUI_code/src/main/java/GcodeCreator.java`](https://github.com/niklashammerstone/galvostep/blob/master/Codes/GUI_code/src/main/java/GcodeCreator.java) (Image G-code creator), [`Codes/GalvoV0_Code/Gcode_creator.py`](https://github.com/niklashammerstone/galvostep/blob/master/Codes/GalvoV0_Code/Gcode_creator.py) (V0 image converter)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_creation["G-code creation"]
  node_java_creator["Image G-code creator<br/>[GcodeCreator.java]"]
  node_v0_creator["V0 image converter<br/>[Gcode_creator.py]"]
end

subgraph group_control["Machine control"]
  node_java_gui["Control GUI<br/>[MainGUI.java]"]
  node_v0_handler["V0 serial sender<br/>[Gcode_handler.py]"]
end

subgraph group_firmware["Firmware"]
  node_v0_firmware["V0 firmware"]
  node_step_firmware["GalvoStep V1 firmware"]
  node_firmware["Galvo firmware<br/>[Galvo_firmware.ino]"]
end

subgraph group_hardware["Hardware and documentation"]
  node_mechanics["Mechanical designs"]
  node_diagrams["Wiring diagrams<br/>[Wiring diagram.pdf]"]
  node_reports["Project reports"]
end

node_user(("Operator"))
node_serial["Serial-connected machine"]

node_user -->|"operates"| node_java_gui
node_java_gui -->|"opens"| node_java_creator
node_java_creator -->|"exports G-code"| node_java_gui
node_java_gui -->|"streams commands"| node_serial
node_serial -->|"returns responses"| node_java_gui
node_user -.->|"uses"| node_v0_creator
node_v0_creator -.->|"provides G-code"| node_v0_handler
node_v0_handler -->|"sends commands"| node_serial
node_serial -->|"returns responses"| node_v0_handler
node_serial -.->|"receives commands"| node_v0_firmware
node_serial -.->|"receives commands"| node_step_firmware
node_serial -.->|"receives commands"| node_firmware
node_user -.->|"builds from"| node_mechanics
node_user -->|"consults"| node_diagrams
node_user -->|"consults"| node_reports

click node_java_gui "https://github.com/niklashammerstone/galvostep/blob/master/Codes/GUI_code/src/main/java/MainGUI.java"
click node_java_creator "https://github.com/niklashammerstone/galvostep/blob/master/Codes/GUI_code/src/main/java/GcodeCreator.java"
click node_v0_creator "https://github.com/niklashammerstone/galvostep/blob/master/Codes/GalvoV0_Code/Gcode_creator.py"
click node_v0_handler "https://github.com/niklashammerstone/galvostep/blob/master/Codes/GalvoV0_Code/Gcode_handler.py"
click node_v0_firmware "https://github.com/niklashammerstone/galvostep/tree/master/Codes/GalvoV0_Code"
click node_step_firmware "https://github.com/niklashammerstone/galvostep/blob/master/Codes/GalvoStepV1_Firmware/GalvoStepV1_Firmware.ino"
click node_firmware "https://github.com/niklashammerstone/galvostep/blob/master/Codes/Galvo_firmware/Galvo_firmware.ino"
click node_mechanics "https://github.com/niklashammerstone/galvostep/tree/master/Mechanics"
click node_diagrams "https://github.com/niklashammerstone/galvostep/blob/master/Documentation/Wiring%20diagram.pdf"
click node_reports "https://github.com/niklashammerstone/galvostep/tree/master/Documentation"

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_java_creator,node_v0_creator toneBlue
class node_java_gui,node_v0_handler toneAmber
class node_v0_firmware,node_step_firmware,node_firmware toneMint
class node_mechanics,node_diagrams,node_reports toneRose
class node_user,node_serial toneIndigo
```

## Components

### G-code creation

- [Image G-code creator](https://github.com/niklashammerstone/galvostep/blob/master/Codes/GUI_code/src/main/java/GcodeCreator.java): `Codes/GUI_code/src/main/java/GcodeCreator.java`
- [V0 image converter](https://github.com/niklashammerstone/galvostep/blob/master/Codes/GalvoV0_Code/Gcode_creator.py): `Codes/GalvoV0_Code/Gcode_creator.py`

### Machine control

- [Control GUI](https://github.com/niklashammerstone/galvostep/blob/master/Codes/GUI_code/src/main/java/MainGUI.java): `Codes/GUI_code/src/main/java/MainGUI.java`
- [V0 serial sender](https://github.com/niklashammerstone/galvostep/blob/master/Codes/GalvoV0_Code/Gcode_handler.py): `Codes/GalvoV0_Code/Gcode_handler.py`

### Firmware

- [V0 firmware](https://github.com/niklashammerstone/galvostep/tree/master/Codes/GalvoV0_Code): `Codes/GalvoV0_Code`
- [GalvoStep V1 firmware](https://github.com/niklashammerstone/galvostep/blob/master/Codes/GalvoStepV1_Firmware/GalvoStepV1_Firmware.ino): `Codes/GalvoStepV1_Firmware/GalvoStepV1_Firmware.ino`
- [Galvo firmware](https://github.com/niklashammerstone/galvostep/blob/master/Codes/Galvo_firmware/Galvo_firmware.ino): `Codes/Galvo_firmware/Galvo_firmware.ino`

### Hardware and documentation

- [Mechanical designs](https://github.com/niklashammerstone/galvostep/tree/master/Mechanics): `Mechanics`
- [Wiring diagrams](https://github.com/niklashammerstone/galvostep/blob/master/Documentation/Wiring%20diagram.pdf): `Documentation/Wiring diagram.pdf`
- [Project reports](https://github.com/niklashammerstone/galvostep/tree/master/Documentation): `Documentation`

### Other components

- **Operator**
- **Serial-connected machine**

## Connections

- Operator → Control GUI: operates (evidence: `README.md`)
- Control GUI → Image G-code creator: opens (evidence: `Codes/GUI_code/src/main/java/MainGUI.java`)
- Image G-code creator → Control GUI: exports G-code (evidence: `Codes/GUI_code/src/main/java/GcodeCreator.java`)
- Control GUI → Serial-connected machine: streams commands (evidence: `Codes/GUI_code/src/main/java/MainGUI.java`)
- Serial-connected machine → Control GUI: returns responses (evidence: `Codes/GUI_code/src/main/java/MainGUI.java`)
- Operator → V0 image converter: uses (evidence: `README.md`)
- V0 image converter → V0 serial sender: provides G-code
- V0 serial sender → Serial-connected machine: sends commands (evidence: `Codes/GalvoV0_Code/Gcode_handler.py`)
- Serial-connected machine → V0 serial sender: returns responses (evidence: `Codes/GalvoV0_Code/Gcode_handler.py`)
- Serial-connected machine → V0 firmware: receives commands
- Serial-connected machine → GalvoStep V1 firmware: receives commands (evidence: `README.md`)
- Serial-connected machine → Galvo firmware: receives commands
- Operator → Mechanical designs: builds from (evidence: `README.md`)
- Operator → Wiring diagrams: consults (evidence: `README.md`)
- Operator → Project reports: consults (evidence: `README.md`)
