Open kammce opened 1 year ago
Implements servo and takes two hal::output_pins, one for step and one for direction as well as how many steps per revolution.
hal::output_pin
#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.
steps_per_revolution
.take
Implements servo and takes two
hal::output_pin
s, one for step and one for direction as well as how many 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.