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.
Implements servo and takes two
hal::output_pins, one for step and one for direction as well as how many steps per revolution.steps_per_revolutionis used to determine how many steps are required to reach a specified angle passed into the position function.