Repository navigation
Releases
Servomotor 0.11.0: PID readback and immediate position targets
Adds PID readback (command 48) and immediate position target methods (commands 49/50), with raw integer, converted-unit and unique-ID overloads. Command 50 returns the latest stored Hall position. Immediate target methods require motor firmware 0.17.0.0.
Converted scalar inputs are checked before transmission; invalid values return error -10. Raw position methods preserve signed 64-bit precision. Replies and CRCs are validated before reporting device faults.
Validated with the Arduino library running on an ESP32-S3 and a physical M17, including repeated new-command acceptance runs and immediate half-turn steps. Immediate targets have no trajectory speed/acceleration profile and require enabled closed-loop position control, an empty queue and zero commanded/planned velocity.
Full release notes: https://github.com/tomrodinger/Servomotor_Arduino_Library/blob/v0.11.0/CHANGELOG.md
Servomotor v0.10.1 — fixes a sketch freeze on an interrupted reply
Upgrade if you have ever seen a sketch stop responding
A reply from the motor that starts but never finishes could hang your sketch forever — no
timeout, no error, no error code. The call simply never returned.
That happens whenever the motor begins answering and is then cut off:
- two motors sharing an alias answering at once (a bus collision)
- a motor rebooting part-way through its reply
- noise on an RS485 pair without bias resistors
Fixed. Such a reply now times out normally, returning -1
(COMMUNICATION_ERROR_TIMEOUT) after about one second, like any other communication failure.
A second, quieter bug fixed alongside it
The leftover bytes of the abandoned reply used to stay in the receive buffer and then be read as the
beginning of the next reply. So one interrupted answer caused two failures: the real one, and
a spurious -7 (bad first byte) on a following command that was itself perfectly fine. Those
leftovers are now discarded.
Behaviour is unchanged when nothing goes wrong.
Also in this release
goToClosedLoop()no longer claims it can raise fatal error 22 on M17. That current-sensor
baseline check exists only on M1, M2 and M23; the M17 firmware performs none, so
ERROR_CURRENT_SENSOR_FAILEDcannot occur there.- The README example now compiles. It used the class name
ServoMotor, which belongs to a
different, unrelated library — the class isServomotor. The sample debug output has also been
replaced with what the library actually prints, and a short section on checkinggetError()
added. - The Trapezoid Move example now checks
getError()after every call. No command method returns
a success flag, and a motor that has latched a fatal error silently ignores everything afterwards
— so an unchecked sketch just stops moving, with no symptom to see.
Verified
63 of 63 on-device test modules (1042 assertions) against a real M17 driven from an ESP32-S3, plus a
dedicated regression test that reproduces the truncated reply deterministically and would have
caught this bug.
No API changes — a drop-in upgrade from v0.10.0.
Servomotor v0.10.0 — variable-length replies (breaking)
⚠️ This release contains breaking API changes
Three methods changed signature
getProductDescription(), captureHallSensorData() and readMultipurposeBuffer() now take a
caller-owned buffer:
void getProductDescription(char* buffer, uint16_t bufferSize, uint16_t* actualSize);Previously each returned a fixed one-byte struct, which silently truncated every variable-length
reply — you could not actually read a product description or a hall-sensor capture. They now return
the full reply, and report through actualSize how many bytes arrived.
Sketches that call any of those three need updating.
Bug fixes
getCurrentTime()andtimeSync()were wrong by a factor of 32. The wire unit for these two
commands is microseconds, and the conversion did not account for it. Any code that read the
motor's clock, or synchronised several motors, was getting values 32× off.- Default units now match the Python library. Current defaults to internal current units, and
voltage defaults to volts. Previously the two libraries disagreed, so the same program written
against each produced different numbers.
Servomotor v0.9.2
Author updated to Gearotons. Assorted improvements and bug fixes, with wider testing.
Still beta software.
(The commit behind this tag mentions "v1.0.0" — that was a slip in the message. This release is v0.9.2.)
Servomotor v0.9.0
Initial release for Arduino Library Manager