- Defined a custom signal type (
VentAngle) - Written two custom components from scratch
- Wired a multi-component simulation graph
- Run steady-state and transient simulations
- Added per-run I/O logging (
export_telemetry) - Optionally trained a hosted ML model from measurements
- Wrapped everything into a reusable composite component
The system
A real greenhouse would also include a
TemperatureSensor, ADC, and power supply. This tutorial feeds temperature directly into the controller so you can focus on component authoring and graph wiring.1. Project setup
2. Custom type: VentAngle
3. ThermostatController
Maps temperature linearly to vent openness (0-1) and encodes it as a 50 Hz PWM signal:4. VentPositionSensor
5. Wire the graph
Fan-out vs fan-in. One output can connect to many inputs (fan-out) on any port. Multiple outputs into one input (fan-in) requires
aggregating_input_port() on the target. See Aggregating Input Ports.6. Steady-state sweep
7. Composite assembly
Package the full control loop as a single reusable component. See Composite Components for theBuildContext API.
