Skip to main content
NewEpisode 8a is out: Two state machines 1: rising edgeWatch →
ROBOTICS · AI AGENTS · FOR ENGINEERS

Read the real code that makes machines move.

Video courses that walk through real open-source robot firmware and agent systems, one mechanism per video. The code on screen is the real source, quoted with file and line, and every waveform comes from running it.

No account needed for the first episode · English and 中文

motor_control/motor_ctl_sm.c:381● real run · SIL
381if (axis->motor_ctl_sm_input.motor_enable == MOTOR_CTL_SM_MOTOR_ENABLE &&
382 axis->motor_ctl_sm_output.motor_enable_last == MOTOR_CTL_SM_MOTOR_DISABLE)
383{
384 ModeCheckInInit(axis, axis_dw); // 使能前初始化
385 axis->motor_ctl_sm_output.state = MOTOR_CTL_SM_STATE_ENABLE; // 进入使能状态
386}
motor_enablestate
0 → 1DISABLE → ENABLE
From episode 8a: the motor enables only on a 0 → 1 edge. Writing 1 again does nothing.
01 / REAL SOURCE

Quoted, never retyped

Every excerpt is cut from the pinned repo with its file and line, so you can open the same spot and keep reading.

02 / REAL RUNS

Measured, not drawn

The firmware runs on a laptop simulation. Trip times, currents and state changes on screen come from those runs, and each one comes with the command to repeat it.

03 / ONE MECHANISM

One idea per video

One mechanism and one running example, followed end to end. Slides and practice questions come with every part.

Courses

Two tracks, one way of teaching.

Releasing nowRobotics

Read an open-source robot-joint servo drive line by line: the interrupts and loops, current sampling, encoders, state machines, identification and safety.

22 parts out3.4 h of video37 episodes planned
AI agents · next

AI agents course

The same close reading, applied to a real open-source agent system. Join the list to hear when the first episode is out.

Start here, free

The big map of a joint motor's firmware in three short parts.

All episodes →

Who it's for

Engineers who already know FOC, PWM, interrupts and PID, and now need to know how a real robot joint drive puts them together, from its first interrupt to the bus.

  • Motor-control engineers moving to robot joint motors
  • Embedded engineers who will work on a drive's firmware
  • Teams deciding whether to build on ServoHub
  • No hardware needed: everything runs on a Mac or Linux laptop
FIELD NOTE · FROM EPISODE 7

We found a bug while making a video, and fixed it

After a failed current calibration, clearing the error and enabling again recalibrates, but PWM never comes back on. We reproduced it in simulation, traced it to one flag in system_init.c, and put the fix on its own branch.

See the fix →

Recently released

One membership, every course

Every episode, slides and practice for each part, new episodes as they come out, and the agent track when it opens.