pytransitions / transitions

A lightweight, object-oriented finite state machine implementation in Python with many extensions
MIT License
5.49k stars 524 forks source link

Make 'light weight' version for CircuitPython #534

Closed Swieter closed 2 years ago

Swieter commented 3 years ago

A lot of machine control can be made simple with state machines. This transition library looks great and I was looking to implementing in CircuitPython. However a Python expert I am not. I'm running into a few things that exist in typical Python that is not in CircuitPython and I'm afraid I'm bashing the code too much.

It would be great if the original creator was able to make something simple and similar for CircuitPython. Thank you.

aleneum commented 3 years ago

Hello @Swieter,

I am not familiar with CircuitPython. So what's the dealbreaker of transitions right now?

Swieter commented 3 years ago

Hi @aleneum

CircuitPython is a form of microPython. Both are putting Python in the embedded world, making it easier to write software at the microcontroller level. I'm a fan of CircuitPython because of the community and support from Adafruit. You can learn more here: https://circuitpython.org. Overall I'm seeing more CircuitPython/microPython coming up in the IIOT and industrial embedded realms so as noted, I thought Transitions would be good here. I'm seeing more hardware too (PLCs and embedded controllers).

CircuitPython tries to follow and implement Python, but naturally there are some things that don't translate over, and other aspects that haven't made the leap yet.

I'll have to take a moment and try and load up the Transitions example again on my hardware and see what errors I'm getting.

aleneum commented 2 years ago

I am closing this since there has not been any feedback for quite a while. Feel free to comment anyway. If there is further demand or new insights considering adjustments required for circuitpython, I will gladly reopen the issue.