Control
Control loops & real time
Read the sensor, compute, command the motor, on every tick. If the beat slips, even the best formula fails.
Learn it here
In order: understand the idea → play with it → open up a real machine → do it yourself → see how real it is
- 1Foundation · freeThe control loop: a steady beatMost robot code is a loop at a fixed beat: read sensors → compute → command motors → wait for the next tick. A steady beat matters as much as the formula.
- 2Play it nowA real board in the loop (hardware-in-the-loop)The page simulates a pole that never stops falling; your ESP32 or Arduino is the brain that holds it, over USB or Bluetooth. See what a slow link does to balance.
3Open it upInside a balance control loopTake apart the loop that keeps a robot upright: sensor, P and D controller, motor and body. Then see how a late sensor and a limited motor make it fall.
4Open it upInside action chunking for a VLA armTake apart how a VLA model drives an arm: an image goes in, a chunk of actions comes out, the arm runs them one by one. See why it pauses, lags or jerks.- 5Workshop · hands-onMake It Stand: get your robot to stand on its ownTune the controller of a robot that is always falling, one chapter at a time, from your first kp to gains ready for a real board
- 6Workshop · hands-onKeep a VLA arm in step with the conveyorWhy robot arms driven by a VLA model pause, fall behind or jerk, and what to tune to fix it
How it links to other subjects
- Motors & driversThe controller's output becomes current through PWM on every tick.
- SensorsEvery control-loop cycle starts by reading a sensor.
- Embedded C++ & firmwareThe control loop runs as firmware that must be on time every cycle.
- Reinforcement learningA trained policy replaces the formula inside the loop, but must still run on the same beat.