SMFlow IconSMFlow
Deterministic Embedded Control|ESP32 • STM32 • RP2040 • AVR • Linux

Visual State Machines for Embedded Control

Build deterministic embedded controllers with a visual programming environment designed for modern microcontrollers. Design your logic as a flow, simulate it, and deploy directly to hardware.

PLC-style determinism. Microcontroller flexibility. Modern visual programming.

pump_controller.smflow — The flow IS the program
● SCAN: 1000 µs (1 kHz)
I/O • Analog In
PressureSensor
ADC1_CH4 (0-10 bar)
psi64.2
Logic • Thresholdfilter
LowPressureCheck
val < 50.0 (hyst: 5.0)
demandfalse
State MachineRUNNING
PumpSeqState
States: Idle | Run | Fault
cur_stateSTATE_RUN
I/O • Relay / PWMACTIVE
MainPumpRelay
GPIO 26 (Opto-Isolated)
energizedtrue
Compiled ahead-of-time to native C++17 • Zero interpreter • Zero heap allocation during scan cycle
Byte-Identical Determinism

Positioning

The Right Tool for Embedded Control

Building custom embedded machinery has historically forced a difficult trade-off between complex C firmware and expensive proprietary PLCs. SMFlow bridges that gap.

Option 1

Traditional C/C++ Firmware

Writing bare-metal drivers, manual timer loops, state machine enums, switch-case blocks, debouncing, and fault handling in C/C++.

✓ Maximum hardware flexibility
✕ Complex to maintain & reason about visually
Option 2

Industrial PLCs

Using IEC 61131 ladder logic / function block systems on dedicated industrial PLC racks.

✓ Deterministic scan execution
✕ Expensive hardware & proprietary vendor lock-in
Option 3

Node-RED / High-Level

Flow-based visual tools designed for Linux gateways, servers, cloud integration, and IoT dashboards.

✓ Intuitive flow-based model
✕ Not for real-time deterministic microcontroller logic
The Solution
SMFlow

Deterministic Visual Control

PLC-style cyclic execution and visual state machines running directly on low-cost modern microcontrollers.

✓ Deterministic & Visual
✓ Inexpensive Microcontrollers ($2–$30)
✓ Ahead-of-time Native C++17

Where SMFlow shines: When a traditional PLC is overkill for your machine or product, but hand-writing and maintaining a complete custom embedded C++ firmware stack is unnecessarily complex and time-consuming.

Developer Experience

From Visual Logic to Running Hardware in Minutes

No toolchain configuration headaches, no complex RTOS boilerplate, no manual state machine tables in C.

01

Select Target

Choose your microcontroller target (ESP32, STM32, RP2040, Arduino Opta, Arduino Nano/AVR, or Linux IPC).

02

Place Hardware I/O

Drag in digital inputs, analog sensors, I²C/SPI peripherals, or CAN bus receivers.

03

Define States & Logic

Add state machine transitions, debounce timers, interlocks, and safety conditions.

04

Simulate Live

Step through scan cycles on your desktop. Inspect variables, forces, and timings in real-time.

05

Deploy to Hardware

Hit Deploy. SMFlow compiles ahead-of-time to C++17 and flashes your microcontroller.

"I just programmed a complete multi-state microcontroller application without having to write the whole controller in C."

Deterministic Execution • Zero Interpreter Overhead • Full C++ Toolchain Compilation

Hardware & Protocol Abstractions

Direct Hardware Interfaces Without Low-Level Boilerplate

SMFlow abstracts low-level registers into clean, deterministic nodes so you can focus on control logic.

GPIO & Digital I/O

Pull-up/down, debounce filtering, interrupt triggers, high-speed PWM.

Analog & ADC/DAC

Voltage reading, pressure/temperature scaling, moving-average filters.

I²C & SPI Buses

Hardware sensor communication, OLED/LCD displays, external memory.

UART & Serial

Telemetry streaming, RS232/RS485 modbus, custom protocol packets.

CAN Bus (Controller Area Network)

Frame filtering, vehicle/industrial telemetry, hydraulic valve control.

Timers & Clocks

On-delay, off-delay, pulse timers, deterministic scan cycle schedulers.

Visual State Machines

Named states, transition guards, entry/exit actions, fault states.

Logic & Arithmetic

Boolean gates, comparator thresholds, mathematical formulas, clamps.

Supported Microcontroller & Hardware Targets

Espressif ESP32 / ESP32-S3STM32 / Arduino Opta PLCRaspberry Pi RP2040Arduino Nano / AVR ATmega328PLinux IPCs (x64 / ARM64)Desktop Simulator

Real-World Systems

Built for Real Machines, Not Abstract Code

See how engineers and OEMs use SMFlow to power physical controllers across industries.

🚰

Pump & Fluid Flow Controllers

Dual-pump lead/lag sequencing, pressure transducer feedback, dry-run interlocks, and fault reset timeouts.

Conceptual Flow
Pressure Transducer → Filtering → Lead/Lag State Machine → Priming Timer → Relay Output
🚧

Automated Gate & Safety Barriers

Obstacle beam detection, safety edge interrupts, open/close sequence states, warning beacon flashers, and limit switches.

Conceptual Flow
Safety Beam → Debounce → Motion State Machine → Acceleration Ramp → Motor Driver
🌡️

Environmental & HVAC Control

Temperature/humidity regulation, PID damper control, fan staging, and hysteresis freeze protection.

Conceptual Flow
I²C Sensor → Moving Average → Setpoint Hysteresis → Relay Staging → Fan PWM
⚙️

Small Custom OEM Machines

Packaging stations, test fixtures, parts feeders, and dispensing automation without buying a $2,000 PLC rack.

Conceptual Flow
Opto Input → Index Counter → State Machine → Solenoid Actuator → Status LED
🤖

Robotics Subsystems & Grippers

Sensor-driven end effectors, stepper homing sequences, current limit checks, and emergency stop interlocks.

Conceptual Flow
Current Sensor → Overload Trigger → Gripper State Machine → Stepper Pulse Driver
🚌

CAN-Bus Mobile & Industrial Controllers

Decoding vehicle/telemetry frames, translating switch commands, driving hydraulic proportional valves over CAN.

Conceptual Flow
CAN RX Frame → ID Filter → Command State Machine → CAN TX / PWM Out
Engineering Efficiency & Maintainability

Why Engineers Pay for SMFlow

The value of SMFlow is not merely counting lines of code. It is radically reducing the cognitive load and engineering hours required to architect, test, deploy, and maintain deterministic embedded systems.

Instant Visual State Reasoning: See every state, transition trigger, timer, and interlock at a glance instead of hunting through scattered switch-case blocks and nested ISR callbacks.
Frictionless Project Handover: Hand your project to another controls or electrical engineer without spending weeks explaining custom firmware architecture.
Modify Machines 6 Months Later: Open an existing controller project months after deployment, understand its exact behavior in seconds, and make updates with zero risk of breaking unrelated timing loops.
The AI & Embedded Engineering Reality

AI can help write code.
SMFlow helps you build the controller.

Large language models have made generating raw code cheaper than ever. But generating code is only a fraction of the embedded engineering challenge.

An engineer still needs to define safe state machines, guarantee microsecond timing, audit hardware interlocks, simulate edge cases, test physical actuators, and safely maintain machines in production.

# Core Principle
SMFlow provides the structured, deterministic environment that turns control intent into validated, deployable embedded logic.

Hard Invariants

Clean C++17 AOT Output.
No Target Interpreters.

SMFlow takes a strict compiler approach: your visual graph compiles ahead of time into readable, byte-identical C++17 that firmware engineers can inspect, audit, and trust. The target device runs no Python, Node.js, JVM, or background interpreter.

  • Deterministic Cyclic Scan: Guarantees strict scan-cycle timing and execution order across tasks.
  • Static Memory Layout: Pre-allocated buffers, zero heap allocations in inner execution loops.
  • Byte-Identical Builds: Deterministic compilation guarantees the same project produces the exact same binary hash every time.
generated/controller_main.cppAhead-of-Time C++17
// Auto-generated by SMFlow ahead-of-time compiler
#include "smflow_runtime.hpp"

void step_cyclic_task() {
    const bool btn_state = hal_read_digital(PIN_DI1);
    const bool motor_cmd = !btn_state;
    hal_write_digital(PIN_DO1, motor_cmd);
}

int main() {
    hal_init();
    while (true) {
        step_cyclic_task();
        hal_wait_next_period_us(1000);
    }
}

Transparent Licensing

Try It Free. Upgrade for Commercial Projects.

Start building for free with the full node library. Upgrade to Pro for unlimited nodes and commercial rights.

Community & Evaluation

SMFlow Free

Fully functional and free forever. Build real projects, test hardware drivers, and evaluate the full workflow.

$0 / perpetual
  • Up to 12 nodes per flow
  • Full microcontroller target support (ESP32, STM32, RP2040, AVR, Linux)
  • Full driver, peripheral & protocol ecosystem (GPIO, I²C, SPI, CAN)
  • Desktop simulator with live scan cycle inspection
  • Visual IDE & standalone CLI tools
  • Never takes files hostage (always open & edit any size project)
Professional Perpetual
Buy Once. Keep Using It.

SMFlow Pro

For engineers, machine builders, system integrators, and commercial controller developers.

$149 / one-time purchase
  • Unlimited nodes per flow
  • Commercial use rights included
  • 3 device activations per seat
  • 100% offline-capable after activation
  • Cross-platform: Windows, Linux, macOS
  • Headless CI/CD build agent support (`SMFLOW_LICENSE_DIR`)
  • Zero runtime fees, zero royalties on compiled binaries