28 #ifndef EL_STEPPER_MOTOR_H
29 #define EL_STEPPER_MOTOR_H
34 #define EL_STEPPER_MOTOR_RATE_MAX 1000
35 #define EL_STEPPER_MOTOR_RATE_MIN 50
37 #define EL_STEPPER_MOTOR_LEFT 0
38 #define EL_STEPPER_MOTOR_RIGHT 1
40 #define EL_EPUCK_FULL_REVOLUTION_STEPS 2512
48 el_bool UseAcceleration;
49 el_uint16 AccelerationRate;
165 #ifdef EL_INCLUDE_LIB_INTERNAL_CONTEXT
169 #define EL_STPM_NUMBER 2
170 #define EL_STPM_DIR_STOP 0
171 #define EL_STPM_DIR_FORWARD 1
172 #define EL_STPM_DIR_REVERSE 2
173 #define EL_STPM_INTERRUPT_FREQ EL_T3_FREQ
174 #define EL_STPM_SPEED_CONTROL_FREQ 50
186 extern el_bool el_stpm_enabled;
187 extern el_bool el_stpm_accel_enabled;
189 void el_init_stepper_motor();
190 void el_routine_stepper_motor_14400hz();
191 void el_routine_stepper_motor_accel_2400hz();
void el_stepper_motor_set_steps(el_index i, el_int16 n)
set the step counter of a motor
void el_enable_stepper_motor(void)
enable the stepper motor module
void el_set_wheel_speed(int left, int right)
change the rotation speed for both of the motors on the e-puck
Definition: el_stepper_motor.h:47
void el_stepper_motor_set_speed(el_index i, int u)
set the stepping rate and direction of a motor
void el_stepper_motor_options_apply()
apply the settings stored in el_stepper_motor_options directly
void el_stepper_motor_options_reset()
reset the settings stored in el_stepper_motor_options to default
void el_disable_stepper_motor(void)
disable the stepper motor module
el_int16 el_stepper_motor_get_steps(el_index i)
get the step counter of a motor
el_stepper_motor_param * el_stepper_motor_options()
get the pointer to a static instance of el_stepper_motor_param
void el_config_stepper_motor(const el_stepper_motor_param *p)
apply the settings in the given structure