Skip to content

Add and refactor servo control functionality and protocols#21

Merged
74th merged 5 commits intomainfrom
feat/servo
Mar 14, 2026
Merged

Add and refactor servo control functionality and protocols#21
74th merged 5 commits intomainfrom
feat/servo

Conversation

@74th
Copy link
Owner

@74th 74th commented Mar 14, 2026

This pull request introduces servo control capabilities to both the firmware and the server, enabling the server to send sequences of servo commands to the client device and receive completion notifications. The changes span protocol documentation, firmware implementation, and server-side support, as well as a new example application demonstrating servo movement.

Key changes:

Protocol and Documentation Updates

  • Added new message kinds ServoCmd (server→client) and ServoDoneEvt (client→server) to the protocol, with detailed payload specifications for sending and acknowledging servo command sequences. (docs/protocols.md, protocols.hpp) [1] [2] [3] [4]

Firmware: Servo Control Implementation

  • Implemented a new BodyServo class to parse, queue, and execute servo command sequences, supporting Sleep, MoveX, and MoveY operations, with smooth motion and completion callbacks. (servo.hpp, servo.cpp) [1] [2]
  • Integrated servo command handling into the firmware main loop, including message parsing, sequence management, and sending ServoDoneEvt notifications upon completion. (main.cpp) [1] [2] [3] [4] [5] [6] [7]
  • Added servo library dependency for firmware build. (platformio.ini, idf_component.yml) [1] [2]

Server: Servo Command Support

  • Extended the WebSocket proxy and protocol handling to support sending servo command sequences and interpreting completion events. (ws_proxy.py) [1] [2]

Example Applications

  • Added a new example application echo_with_move.py that demonstrates sending servo movement sequences in response to events, such as listening and speaking.
  • Minor refactoring in echo.py for import formatting and conditional logic. [1] [2]

@74th 74th merged commit 65d1015 into main Mar 14, 2026
1 check passed
@74th 74th deleted the feat/servo branch March 14, 2026 00:38
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.

1 participant