Skip to content

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

Merged
laurb9 merged 3 commits into
masterfrom
docs/api-reference
Jul 18, 2026
Merged

laurb9 merged 3 commits 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

laurb9 and others added 3 commits July 6, 2026 23:40
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>
Add TB6600 to the class table and constructor list (with DIP-switch
microstepping and active-LOW ENA notes) and document the step pulse
timing API (setMinStepPulse, getMinStepPulseHigh/Low) added in #140.

Agent: claude-fable-5 (Claude Code 2.1.212)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@laurb9
laurb9 merged commit 2aba62e into master Jul 18, 2026
11 checks passed
@laurb9
laurb9 deleted the docs/api-reference branch July 18, 2026 02:09
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