... | @@ -17,4 +17,19 @@ pid_current=https://gitlab.laas.fr/owntech/power-api/opalib-pid-current-mode.git |
... | @@ -17,4 +17,19 @@ pid_current=https://gitlab.laas.fr/owntech/power-api/opalib-pid-current-mode.git |
|
|
|
|
|
# How to use
|
|
# How to use
|
|
|
|
|
|
TODO |
|
* Add the following line to your main: `#include "opalib_pid_current_mode.h"`.
|
|
\ No newline at end of file |
|
* Initialize the pid with `opalib_pid_current_init()`
|
|
|
|
* Run the PID calculation periodically with `opalib_pid_current_periodic_task()` in order to update the duty cycle in the PWM.
|
|
|
|
|
|
|
|
## Example of library use in combination with Library Quick start
|
|
|
|
|
|
|
|
```c++
|
|
|
|
#include "opalib_quick_start.h"
|
|
|
|
#include "opalib_pid_current_mode.h"
|
|
|
|
|
|
|
|
void main(void)
|
|
|
|
{
|
|
|
|
opalib_pid_current_init(15, 0.077, 4653.0, 0.0);
|
|
|
|
opalib_quick_start_init_current(opalib_pid_current_periodic_task, 50);
|
|
|
|
}
|
|
|
|
``` |
|
|
|
\ No newline at end of file |