mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
add a small example
This commit is contained in:
parent
c7e0a717b6
commit
f813bd161d
@ -1,3 +1,13 @@
|
|||||||
|
'''
|
||||||
|
Example:
|
||||||
|
from pid import PID
|
||||||
|
pid1 = PID(p=0.07, i=0, imax=90)
|
||||||
|
while(True):
|
||||||
|
error = 50 #error should be caculated, target - mesure
|
||||||
|
output=pid1.get_pid(error,1)
|
||||||
|
#control value with output
|
||||||
|
'''
|
||||||
|
|
||||||
from pyb import millis
|
from pyb import millis
|
||||||
from math import pi, isnan
|
from math import pi, isnan
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user