SWARM-Bot Firmware
v1.0
Mobile robot OS - Embedded C/C++
|
Header file for dc_control.c. More...
#include <__swarm_wold__.h>
Go to the source code of this file.
Macros | |
#define | MA 1 |
#define | MB 2 |
#define | DEBUG_CONTROLLER 0 |
#define | K_P 4.0 |
#define | K_I 0.3 |
#define | K_D 0.5 |
Functions | |
int16_t | _ref (uint8_t motor) |
void | _command (uint8_t motor, int16_t inputValue) |
float | _sens (uint8_t motor) |
int | _set_speed (uint8_t motor, int value) |
void | _break_motor (uint8_t motor) |
void | _init_dc_control (void) |
int16_t | _update_controller (uint8_t motor) |
int16_t | _dc_controller_loop (void) |
Header file for dc_control.c.
$RCSfile$
Definition in file __dc_control__.h.
void _break_motor | ( | uint8_t | motor | ) |
breaks the
motor |
[in] | motor | motor MA or MB. |
Referenced by _set_speed().
void _command | ( | uint8_t | motor, |
int16_t | inputValue | ||
) |
Output command module for
motor | of value |
inputValue |
[in] | motor | motor MA or MB. |
[in] | inputValue | input value |
References _set_speed().
int16_t _dc_controller_loop | ( | void | ) |
PID DC controller loop
void _init_dc_control | ( | void | ) |
Initialize the DC PID control module
References pid_Init().
int16_t _ref | ( | uint8_t | motor | ) |
Reference for
motor |
[in] | motor | motor MA or MB. |
Referenced by _update_controller().
float _sens | ( | uint8_t | motor | ) |
sensor module for
motor |
[in] | motor | motor MA or MB. |
Referenced by _update_controller().
int _set_speed | ( | uint8_t | motor, |
int | value | ||
) |
L298 driver module using PWM signals and motor orientation
value | can be negative or positive for direction |
[in] | motor | motor MA or MB. |
[in] | value | speed value |
References _break_motor().
Referenced by _command().
int16_t _update_controller | ( | uint8_t | motor | ) |
Update a control iteration for a discrete PID controller for the DC motor
[in] | motor | motor MA or MB. |
References _ref(), _sens(), and pid_Controller().