Closed tuemar closed 2 years ago
Hi! Thanks for the feedback. This should be fixed by #68 which is now merged. This allows you to set which time function you want the PID to use like this for example:
import time
pid = PID()
pid.time_fn = time.ticks_us
# Use pid as normal
The PID controller works since #63 on micropython/pi pico. The only problem is that pi pico only delivers seconds as int when calling time.time(). So the minimum sample rate is 1 second. I solved the problem, but since I'm new to git, I was not able to Pull request. The file where the changes were made is attached. pid.txt