Review Guide
This guide covers a quick summary and defining points of all critical topics covered thus far.
General Concept
-
Precompiled CNC Operation: Standard CNC machine controllers work by converting precompiled motion instructions (toolpaths) to signals that move stepper motors in a coordinated way. This process is beneficial because it enables precise machine motion and (semi)automated fabrication.
-
Limitation: It is very hard with this approach to build a machine that works in any way EXCEPT executing pre-planned operations in sequence.
-
What is Stepdance?: Stepdance is a platform for CNC motion control for broad exploration and experimentation with machine interaction.
-
How Does Stepdance Work? By enabling control of CNC movement through relative step and direction motion streams, rather than precompiled toolpaths.
What are Motion Streams?

-
Stepper motors- the motors that make CNC machines move are controlled by sending electrical signals that tell the motors to take a step, and in which direction.
-
Regular CNC controllers hide these motion signals under higher-level representations that specify absolute position (e.g. GCode).
-
Stepdance Approach: Stepdance uses motion streams as a primary datatype to control machine movement through a hardware and software platform.
You can think of Stepdance as the modular audio synthesizer / Max MSP of motion control platforms. Instead of transmitting audio signals between physical boards or dataflow software modules, Stepdance transmits "motion" across its boards and software modules.
This guide provides a detailed overview on Motion Streams
Hardware
Stepdance hardware consists of two physical boards termed modules. The Machine Controller Module and the Basic Module.

Machine Controller Module
The Machine Controller is your interface for directly controlling all motors on a target CNC machine. It can also be used to develop and programming physical interfaces and software routines for controlling these motors.

Detailed technical specs on the Machine Controller are here. Learn about getting started programming the Machine Controller Module with the Step-A-sketch example.
Basic Module
The Basic Module is an optional extension for the machine controller that enables extending the ports for input on the machine controller and experimenting with different physical interfaces.

Learn about getting started with the Basic Module with the Basic Module Guide.
Stepdance Software Library (SSL)
-
Programming Stepdance The microcontrollers on the Basic and Machine Controller Modules can be programed using the Stepdance software library or SSL— an Arduino compatible embedded programming library.
-
SSL Format: The SSL library uses a dataflow paradigm- meaning you create mappings between software components representing interface elements, motion channels, and motor output ports to stream motion from interfaces to outputs.

- SSL Components: The SSL contains software components that support different forms of motion stream creation, manipulation and output. We'll quickly review them below:
Channels and Output Ports
OutputPorts convert internal step commands into movement signals and correspond with the physical output on the Machine Controller.
The channel stores the motor's current positional state and has a target that can be updated by other modules.
Channels and Output ports are the last components in a Stepdance motion stream pipeline.
Inputs
Input components represent physical input ports on the modules like encoders, buttons, and potentiometers which can generate motion streams which are then mapped to downstream motion channels.

Generators
Generators synthesize motion internally with simple mathematical functions. For example if you want to have a servo move a set distance up or down on a button press, you can use a position generator, which will generate a motion stream that moves a fixed distance at a specified interval, and toggle this position generator using functions mapped to the input.

Velocity generators will move a channel at a set speed which can be updated on the fly.

Wave generators will produce a sinusoidal waveform where the oscillating output can be mapped to a downstream component.

Kinematics
In many cases designers need to map between the coordinate space of a CNC mechanism and the coordinate space of the interface- for example using two encoders to enable Cartesian control of a coreXY mechanism. Kinematics facilitate this by performing transformations between coordinate spaces from upstream to downstream components.

Stepdance also includes kinematics that represent target interface structures that align with common tools like a polar to Cartesian kinematics that enables simulating a polar interface on a different mechanism.

Interpreters
Interpreters support the integration of precompiled motion into stepdance through established CNC automated control methods- e.g. using an Inkscape SVG as a preplanned toolpath. You can mix these with other forms of motion stream generation and manipulation.

For detailed instructions on using interpreters check out Intro to Interpreters
Coordinate Systems
- Review: How do coordinates work,
Execution Order and Timing
- Remember:
setup()configures once,loop()sustains continuously; actions can overlap or queue. - Review: What runs when, Intro to Generators.