Skip to content

Add API reference manual in docs/API.md (fixes #82)#143

Open
laurb9 wants to merge 1 commit into
masterfrom
docs/api-reference
Open

Add API reference manual in docs/API.md (fixes #82)#143
laurb9 wants to merge 1 commit into
masterfrom
docs/api-reference

Conversation

@laurb9

@laurb9 laurb9 commented Jul 7, 2026

Copy link
Copy Markdown
Owner

Summary

Adds docs/API.md, a reference manual for the library's public API, addressing the long-standing documentation request in #82. Written directly from the headers in src/ (not from memory), covering:

  • Class overview table (driver boards, microstep pins, max microstep levels)
  • Units: microsteps vs degrees vs RPM vs full steps/s², including the AVR 16-bit int overflow pitfall in step-count expressions
  • Constructors and pin arguments for BasicStepperDriver, A4988, DRV8825, DRV8834, DRV8880, TMC2100
  • begin / setRPM / setMicrostep / setSpeedProfile with CONSTANT_SPEED vs LINEAR_SPEED semantics (trapezoidal/triangular profiles, precalculated ramps)
  • Blocking (move/rotate) and non-blocking (startMove/startRotate/nextAction/startBrake/stop) flows with usage examples, including how to use nextAction()'s return value as a time budget
  • State queries (getCurrentState, getStepsRemaining, getTimeForMove — with the note that the latter sets up move parameters in LINEAR_SPEED mode)
  • enable/disable/setEnableActiveState and the ~SLEEP (active HIGH) vs ~ENABLE (active LOW) polarity convention
  • DRV8880::setCurrent() torque control
  • MultiDriver vs SyncDriver group APIs with a two-axis example

Also links the manual from README (new Documentation section) and adds docs/ to the AGENTS.md repository-structure diagram.

Docs-only change, no code affected. Based on the current master API; if #140 (setMinStepPulse) and #141 (TB6600) merge, I can follow up with the corresponding additions.

Fixes #82.

Agent: claude-fable-5 (Claude Code 2.1.153); max context and thinking level not exposed to the agent

🤖 Generated with Claude Code

Documents the full public API from the headers in src/: construction and pin
arguments for all driver classes, begin/setRPM/setMicrostep/setSpeedProfile,
blocking (move/rotate) vs non-blocking (startMove/nextAction/startBrake/stop)
flows with usage examples, state query methods, enable/disable semantics
(nSLEEP vs nENABLE polarity), units (microsteps, degrees, RPM, full steps/s^2
— including the AVR int-overflow pitfall in step expressions), the
CONSTANT_SPEED vs LINEAR_SPEED profiles, DRV8880 torque control, and the
MultiDriver/SyncDriver group APIs. Linked from README; AGENTS.md repository
structure updated.

Agent: claude-fable-5 (Claude Code 2.1.153); max context and thinking level not exposed to the agent
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create Wiki or Manual

1 participant