⚠ Under heavy construction

As of July 11, 2026, Sorter V2 is not yet in a position to be built.

The documentation that exists is incomplete. Any given page may be accurate, inaccurate, present only as an example, or badly out of date. We do not yet recommend that anyone attempt to build Sorter.

For the most live updates on our progress, join our Discord ↗.

Sorter Configuration

machine.toml Reference

All fields for the machine-specific config file. Set MACHINE_SPECIFIC_PARAMS_PATH to point to your copy.

[servo]

Controls flap servo angles and hardware backend selection.

KeyTypeDefaultDescription
open_angleint (0–180)10Angle in degrees for the open (drop) position.
closed_angleint (0–180)83Angle in degrees for the closed (hold) position.
backend"pca9685" | "waveshare""pca9685"Servo driver to use. "pca9685" uses the onboard I²C driver; "waveshare" uses the SC bus over USB.
portstringauto-detectedSerial port for the Waveshare SC bus. Omit to auto-detect. Only used when backend = "waveshare".

[[servo.channels]]

Per-channel servo configuration. One entry per servo, in layer order. Only used when backend = "waveshare".

KeyTypeDefaultDescription
idint | nullSC bus servo ID (1–253). Null skips this slot.
invertboolfalseFlip the direction of open/closed angles for this servo.

[layers]

Bin layout — one inner array per physical layer of the tower (bottom to top), each containing bin size strings.

KeyTypeDefaultDescription
sectionsarray of arraysEach element is a layer; each layer is an array of bin-pair arrays like ["medium","medium"]. Defines the physical bin topology.
servo_open_anglestable {layer_index = angle}Per-layer open angle overrides. Keys are 0-based layer indices.
servo_closed_anglestable {layer_index = angle}Per-layer closed angle overrides. Keys are 0-based layer indices.

[chute]

Chute stepper calibration — home pin wiring and bin layout geometry.

KeyTypeDefaultDescription
home_pin_channelint3Digital input channel index on the distribution board where the chute endstop is wired.
first_bin_centerfloat (degrees)8.25Angular position of the first bin center after homing completes.
pillar_width_degfloat (degrees)8.25Angular width consumed by each divider pillar between bins.
endstop_active_highbooltrueSet to true if the chute endstop input reads high when physically triggered.
operating_speed_microsteps_per_secondint3000Chute stepper top speed during normal positioning moves.

Carousel stepper calibration — home pin wiring.

KeyTypeDefaultDescription
home_pin_channelint2Digital input channel index on the feeder board where the carousel home sensor is wired.
endstop_active_highboolfalseSet to true if the carousel home sensor reads high when triggered.

[machine_setup]

Selects the overall machine topology. Changing this requires a full reset and re-home.

KeyTypeDefaultDescription
type"standard_carousel" | "classification_channel" | "manual_carousel""standard_carousel""standard_carousel": full FIDA + carousel + classification path. "classification_channel": dedicated C-channel classifier. "manual_carousel": operator places parts directly into the carousel.

[stepper_bindings]

Remaps logical stepper names to physical firmware channel names when the physical wiring does not match the firmware defaults.

KeyTypeDefaultDescription
carouselstring (physical stepper name)Override which physical stepper drives the carousel.
c_channel_1string (physical stepper name)Override which physical stepper drives C-channel 1.
c_channel_2string (physical stepper name)Override which physical stepper drives C-channel 2.
c_channel_3string (physical stepper name)Override which physical stepper drives C-channel 3.
chutestring (physical stepper name)Override which physical stepper drives the distribution chute.

[stepper_direction_inverts]

Flip the logical direction of a stepper without reflashing firmware. Keys are logical stepper names (carousel, c_channel_1, c_channel_2, c_channel_3, chute).

KeyTypeDefaultDescription
<logical_stepper_name>boolfalseSet to true to invert CW/CCW for that stepper. Example: carousel = true

[stepper_current_overrides.<stepper_name>]

Per-stepper TMC driver current settings. Omit to use firmware defaults. Keys are physical or canonical stepper names.

KeyTypeDefaultDescription
irunint (0–31)16Run current register value. Higher = more torque, more heat.
iholdint (0–31)4Hold current register value when the stepper is stopped.
ihold_delayint (0–15)8Delay (in clock cycles) before current ramps from irun to ihold after a move ends.

[cameras]

Camera layout and device index assignments.

KeyTypeDefaultDescription
layout"default" | "split_feeder""default""default": single feeder camera + classification cameras. "split_feeder": separate camera per C-channel + carousel.
feederintOpenCV device index for the feeder camera. Used in "default" layout.
carouselint | string (URL)Device index or MJPEG URL for the carousel/classification camera.
classification_topint | string (URL)Device index or URL for the top classification camera.
classification_bottomint | string (URL)Device index or URL for the bottom classification camera.
c_channel_2intDevice index for the C-channel 2 camera. Only used in "split_feeder" layout.
c_channel_3intDevice index for the C-channel 3 camera. Only used in "split_feeder" layout.

[camera_capture_modes.<role>]

Per-camera capture settings. Role matches camera keys from [cameras] (e.g. feeder, carousel). Strongly recommended on Linux to force MJPG and avoid USB bandwidth exhaustion.

KeyTypeDefaultDescription
fourccstringFour-character code for the capture format. "MJPG" is strongly recommended on Linux multi-cam setups.
widthintCapture width in pixels.
heightintCapture height in pixels.
fpsintTarget capture frame rate.

[camera_picture_settings.<role>]

Per-camera image transform settings applied after capture.

KeyTypeDefaultDescription
rotationint (0, 90, 180, 270)0Clockwise rotation in degrees applied to every captured frame.
flip_horizontalboolfalseMirror the image left-to-right.
flip_verticalboolfalseFlip the image top-to-bottom.