m-lundberg / simple-pid

A simple and easy to use PID controller in Python
MIT License
767 stars 209 forks source link

port to CircuitPython #32

Closed mgenova79 closed 2 years ago

mgenova79 commented 3 years ago

Not an issue, but just a question.

Is there any chance someone would be willing to port this to CircuitPython for use with adafruit boards? There currently is no PID library available for CircuitPython (or even micropython that I can find) and I think that it would be great to have your library available to circuitpython compatible microcontrollers. I actually tried myself by using mpy cross and I successfully compiled a .mpy but the resulting library fails to create an instance with:

import pid pid = PID(1, 0.1, 0.05, setpoint=1)

I'm sure there are many other CircuitPython users that would like to use your library as it is very easy to use, and currently would be the only go-to solution.

Thank you, Mike G

mz3-andrey commented 3 years ago

I use uPython at work and PID. I could do this when I'm again working on a project that requires both.

m-lundberg commented 2 years ago

I've never used it myself but I've seen that there exists a fork for MicroPython which might help you out: https://github.com/gastmaier/micropython-simple-pid