> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hardwave.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction

> Hardwave is a hardware simulation and development platform. Design circuits and systems in Python before touching any hardware.

Hardwave models hardware as a **dataflow graph of components**. Each component is a typed black box with input ports, output ports, and a solver that turns inputs into outputs. Connect components into a graph, run the simulation engine, and get results: from a simple voltage divider to a full robot drivetrain.

## Why Hardwave?

Hardware prototyping is expensive and slow. You design something, order parts, assemble it, test it, and discover a motor draws twice the expected current. Then you iterate. Hardwave lets you close that loop in software:

* **Simulate** electrical, mechanical, and thermal behaviour before buying anything
* **Compose** components into systems. A resistor, a motor driver, and a microcontroller all share the same interface
* **Calibrate** simulation models against real measurements from physical hardware
* **Swap solvers**: start with a formula, replace it with a hosted ML model trained on real data, without changing any wiring

## Quick Start

<Steps>
  <Step title="Install Hardwave">
    Install the Python package and import the standard library to register built-in types and components.
  </Step>

  <Step title="Build a graph">
    Add component instances to a `SimulationGraph` and wire their ports together.
  </Step>

  <Step title="Run the engine">
    Validate the graph, then call `SimulationEngine.run()` for steady-state or transient results.
  </Step>
</Steps>

## Core Concepts

| Concept       | Description                                                                                 |
| ------------- | ------------------------------------------------------------------------------------------- |
| **Type**      | A named, physically-meaningful signal (e.g. `DCVoltage`, `Torque`, `Temperature`)           |
| **Port**      | A typed input or output slot on a component; aggregating inputs accept multiple connections |
| **Component** | A node in the simulation graph with ports and a solver                                      |
| **Solver**    | The computation that transforms inputs to outputs (formula, ODE, lookup table, ML model)    |
| **Composite** | A component built from other connected sub-components; externally identical to a primitive  |
| **Graph**     | A directed acyclic graph of connected component instances                                   |
| **Engine**    | Runs the graph, propagates values through it, and returns a result                          |
| **Health**    | Runtime component state: OK, WARNING, or FAULT (see fault-aware stdlib components)          |

Everything is a component. A resistor is a component. An Arduino is a component. A robot arm is a component. The abstraction never breaks.

## Component health and faults

Stdlib components like `DCMotor` and `LiPoCell` monitor operating limits during simulation. When a motor overheats or a battery over-discharges, the engine records structured diagnostics and can degrade component outputs, making it possible to stress-test power supplies, validate shutdown firmware, and teach failure modes before hardware breaks.

<Card title="Component Faults and Health" icon="triangle-exclamation" href="/guides/component-faults">
  Runtime warnings, fault codes, and FaultMode configuration
</Card>

## What's Next?

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/quickstart">
    Simulate a voltage divider in under five minutes
  </Card>

  <Card title="Core Concepts" icon="book" href="/guides/core-concepts">
    Learn types, ports, components, and solvers
  </Card>

  <Card title="Component Faults" icon="triangle-exclamation" href="/guides/component-faults">
    Warnings, faults, and degraded behaviour during simulation
  </Card>

  <Card title="Building Graphs" icon="diagram-project" href="/graphs">
    Wire components together and validate connections
  </Card>

  <Card title="Aggregating Ports" icon="merge" href="/guides/aggregating-ports">
    Combine multiple connections on one input port
  </Card>

  <Card title="Greenhouse Tutorial" icon="leaf" href="/guides/greenhouse-tutorial">
    Build a complete vent controller from scratch
  </Card>

  <Card title="Standard Library" icon="cubes" href="/stdlib">
    Browse 30 signal types and 28 built-in components
  </Card>

  <Card title="Premium Components" icon="cloud" href="/premium">
    Use high-fidelity cloud-served models in your simulations
  </Card>
</CardGroup>
