Functions | |
| void | e_init_motors (void) |
| Initialize the motors's agendas. | |
| void | e_set_speed_left (int motor_speed) |
| Manage the left motor speed. | |
| void | e_set_speed_right (int motor_speed) |
| Manage the right motor speed. | |
| void | e_set_speed (int linear_speed, int angular_speed) |
| Manage linear/angular speed. | |
| void | e_set_steps_left (int steps_left) |
| Set the number of left motor steps. | |
| void | e_set_steps_right (int steps_right) |
| Set the number of right motor steps. | |
| int | e_get_steps_left () |
| Give the number of left motor steps. | |
| int | e_get_steps_right () |
| Give the number of right motor steps. | |
This module manage the motors with the fast agenda solution (timer1, 2, 3).
| int e_get_steps_left | ( | void | ) |
Give the number of left motor steps.
| int e_get_steps_right | ( | void | ) |
Give the number of right motor steps.
| void e_init_motors | ( | void | ) |
Initialize the motors's agendas.
This function initialize the agendas used by the motors. In fact it call e_activate_agenda(void (*func)(void), int cycle) function.
This function initialize the ports used by the motors. In fact it call "the e_init_port()" function.
This function configure timer3 and initialize the ports used by the motors. In fact it call "the e_init_port()" function.
| void e_set_speed | ( | int | linear_speed, | |
| int | angular_speed | |||
| ) |
Manage linear/angular speed.
This function manage the speed of the motors according to the desired linear and angular speed.
| linear_speed | the speed in the axis of e-puck | |
| angular_speed | the rotation speed (trigonometric) |
| void e_set_speed_left | ( | int | motor_speed | ) |
Manage the left motor speed.
This function manage the left motor speed by changing the MOTOR1 phases. The changing phases frequency (=> speed) is controled by the agenda (throw the function e_set_agenda_cycle(void (*func)(void), int cycle)).
| motor_speed | from -1000 to 1000 give the motor speed in steps/s, positive value to go forward and negative to go backward. |
| motor_speed | from -1000 to 1000 give the motor speed in steps/s, positive value to go forward and negative to go backward. |
This function manage the left motor speed by changing the MOTOR1 phases. The changing phases frequency (=> speed) is controled by the timer5.
| motor_speed | from -1000 to 1000 give the motor speed in steps/s, positive value to go forward and negative to go backward. |
This function manage the left motor speed by changing the MOTOR1 phases. The changing phases frequency (=> speed) is controled by the timer3.
| motor_speed | from -1000 to 1000 give the motor speed in steps/s, positive value to go forward and negative to go backward. |
| void e_set_speed_right | ( | int | motor_speed | ) |
Manage the right motor speed.
This function manage the right motor speed by changing the MOTOR2 phases. The changing phases frequency (=> speed) is controled by the agenda (throw the function e_set_agenda_cycle(void (*func)(void), int cycle)).
| motor_speed | from -1000 to 1000 give the motor speed in steps/s, positive value to go forward and negative to go backward. |
| motor_speed | from -1000 to 1000 give the motor speed in steps/s, positive value to go forward and negative to go backward. |
This function manage the right motor speed by changing the MOTOR2 phases. The changing phases frequency (=> speed) is controled by the timer4.
| motor_speed | from -1000 to 1000 give the motor speed in steps/s, positive value to go forward and negative to go backward. |
This function manage the right motor speed by changing the MOTOR2 phases. The changing phases frequency (=> speed) is controled by the timer3.
| motor_speed | from -1000 to 1000 give the motor speed in steps/s, positive value to go forward and negative to go backward. |
| void e_set_steps_left | ( | int | set_steps | ) |
Set the number of left motor steps.
| set_steps | The number of changed phases that you want set. |
| void e_set_steps_right | ( | int | set_steps | ) |
Set the number of right motor steps.
| set_steps | The number of changed phases that you want set. |
1.5.4