Skip to content

Servo motor control #7

Open
Open
@mircoslepko

Description

@mircoslepko

Hi Nikolay, really a nice project, congratulations!
I would like to make some modifications to have the ability to control a small servo motor using the command M3 S([0-9]+)

In the hal.py file I find spindle_control() that I could use for my purpose.
According to you, which pin can I use (and how) to rotate the servo?
I would like M3 S0 servo motor = 0° and M3 S10000 servo motor = 180°
I see that you manage everything through the rpgpio.py file, I was thinking I could add a new method (eg. add_pin_servo() ) but I do not know how to handle gpio for servo rotation.

My need is to use the servo to move up and down a pen (am i making a plotter) do you have any alternative solution to handle a servo?

Can you give me some help?
Thank you for the reply

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions