Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

applet.control.servo: an applet for controlling servomotors and brushless ESC modules #486

Merged

Conversation

whitequark
Copy link
Member

@whitequark whitequark commented Nov 11, 2023

Right now this supports only a single channel and a fixed minimum/maximum/update frequency (1ms/2ms/50 Hz). These restrictions can be relaxed in the future if this is desired.

This is a REPL-only applet (which in itself is a new category established in this PR). It doesn't feel like ther's a good way to make a CLI for servos, and having only a REPL makes snense here.

This applet can also serve as an example of a rather simple applet that follows the latest best practices.

@whitequark whitequark requested a review from attie November 11, 2023 01:55
@whitequark whitequark force-pushed the wip-applet.control.servo branch 8 times, most recently from 74c6af1 to f1a3029 Compare November 12, 2023 20:16
@whitequark whitequark requested review from tpwrules and removed request for attie November 12, 2023 20:17
@whitequark
Copy link
Member Author

@tpwrules has agreed to be the code owner for the applet.

@whitequark whitequark force-pushed the wip-applet.control.servo branch from 7f911a1 to 757eaa8 Compare November 16, 2023 20:57
Copy link
Contributor

@tpwrules tpwrules left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works nicely with a standard MG995 hobby servo. Can be controlled in loops too in the REPL to do e.g. a controlled sweep.

One note: interrupting the servo signal (e.g. by pressing E-STOP or disconnecting the wire) has a chance of causing the servo to move if the pulse happens to be truncated. Currently this seems to happen abnormally frequently when using the E-STOP key so be aware.

@whitequark whitequark added this pull request to the merge queue Nov 17, 2023
Merged via the queue into GlasgowEmbedded:main with commit 5e1f94d Nov 17, 2023
18 of 20 checks passed
@whitequark whitequark deleted the wip-applet.control.servo branch November 17, 2023 00:58
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.

2 participants