Examples & samples
Every sample is a complete project in the public repo — open the .smflow, press F5 to simulate orF6 to build. 32 of them, from the minimal program to full reference controllers. New to SMFlow?See how a flow works first →
Basics
One idea each, nothing extra — start here.

NOT gate
The minimal complete program — one input, one output.

Serial debug
Printing a labelled, formatted value to a serial console.

Single counter
The canonical IEC 61131-3 counter block with edge detection, preset, and reset.

Variable compare
Reading a named variable and branching on less-than, equal, and greater-than.
Logic
Combinational and latching behaviour.
Timing
Delays, periods, and edges.
I/O on real boards
The same logic bound to real pins.

Pico latch
A two-state latch, with .iomap pin binding.

Pico interlock
The interlock running on hardware.

Opta interlock
The interlock on an Arduino Opta.

Opta relay toggle
Alternating relay pairs at 0.5 Hz (1 & 3 vs 2 & 4).

Opta 2-bit counter
A 4-relay sequential stepper driven by the user button and a 2-bit ripple counter.

PWM piezo
A PWM duty cycle and a piezo tone, and the timers they claim.

Piezo double beep
Gating a tone with select — a piezo and nothing else to wire.
Peripherals
Displays, sensors, and LEDs over I²C and SPI.
Applications
End-to-end projects, closer to a real product.

LoRa transmitter (ack)
Binary LoRa packets with a payload schema and acknowledged delivery.

LoRa transmitter (simple)
A minimal, fire-and-forget LoRa transmitter.

LoRa receiver (ack)
Decoding the LoRa payload schema and acknowledging receipt.

LoRa receiver (simple)
A minimal LoRa receiver.

Modbus analog server
Four analog channels served as Modbus TCP input registers, with a fallback when the client goes away.

Modbus diagnostic
The same server with its status counters on a 20×4 LCD — a commissioning tool for when a client gets nothing back.
Automotive
Standalone ECUs and retrofit control modules.

Alternator regulator
A standalone ECU replacement for a 2020 GM Duramax alternator with 128 Hz PWM RVC regulation, soft-start, thermal derating, and overvoltage latching.

Cooling fan controller
A dual electric cooling-fan controller with staged PWM, 5°C hysteresis, A/C override, highway ram-air lockout, after-run rundown, and fail-safe diagnostics.

Seat climate controller
A retrofit heated and cooled seat controller with 3-level thermostatic regulation, PWM fan control, soft-start, open/short sensor detection, and ignition rundown.

Wiper controller
A windshield wiper module with multi-speed interlocked wiping, intermittent timing, washer drip cycles, auto-park, ignition-off rundown, and dual watchdog stall timeouts.

Power window controller
A power window module with momentary/express travel, FMVSS 118 anti-pinch reversal, end-stop stall cutoff, and 30 s Retained Accessory Power with door cancel.
Industrial automation
Process and machine control, the way a PLC would do it.

Pump controller
Pressure/level hysteresis, anti-short-cycle and anti-rapid-recycle timers, dry-run and overload faults, 3-position HOA modes, and latched alarms.

Pneumatic cylinder sequencer
Extend, dwell, and retract phases with dual watchdog jam detection, simultaneous-sensor conflict lockout, stop abort, and alarm reset.

Temperature controller
Dual-mode heat/cool hysteresis, startup delay, post-heat cooldown, emergency over-temperature purge, open/short sensor fault detection, and set-dominant latched alarms.






