Skip to content

Add hal::soft::stepper_motor implementation #21

@kammce

Description

@kammce

Implements servo and takes two hal::output_pins, one for step and one for direction as well as how many steps per revolution.

#include <libhal/servo.hpp>
#include <libhal/output_pin.hpp>

class stepper_motor : public hal::servo
{
  stepper_motor(hal::output_pin& p_direction,
                hal::output_pin& p_step,
                float p_steps_per_revolution);
};

steps_per_revolution is used to determine how many steps are required to reach a specified angle passed into the position function.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions