Is there a working FSM library for micropython

Discussion about programs, libraries and tools that work with MicroPython. Mostly these are provided by a third party.
Target audience: All users and developers of MicroPython.
Post Reply
ilium007
Posts: 37
Joined: Tue Feb 16, 2021 10:29 am

Is there a working FSM library for micropython

Post by ilium007 » Sat May 01, 2021 7:00 am

I started looking at the transitions library (https://github.com/pytransitions/transitions) but it requires even more libraries to run. Just wondering if anyone has a go to finite state machine library they are using on micropython?

HermannSW
Posts: 197
Joined: Wed Nov 01, 2017 7:46 am
Contact:

Re: Is there a working FSM library for micropython

Post by HermannSW » Sun May 02, 2021 7:47 pm

Raspberry Pico microcontroller micropython supports (8) hardware state machines.
Pico-W Access Point static file webserver:
https://github.com/Hermann-SW/pico-w

Tiny MicroPython robots (the PCB IS the robot platform)
viewtopic.php?f=5&t=11454

webrepl_client.py
https://github.com/Hermann-SW/webrepl#webrepl-shell

User avatar
mattyt
Posts: 410
Joined: Mon Jan 23, 2017 6:39 am

Re: Is there a working FSM library for micropython

Post by mattyt » Mon May 03, 2021 2:42 am

I have considered porting transitions - it's a nice library - but ran into the same problems; it's not a trivial port!

One of my colleagues wrote Statechart that works on both Python and MicroPython. It's not as feature-rich as transitions but hopefully it'll satisfy your requirements.

ilium007
Posts: 37
Joined: Tue Feb 16, 2021 10:29 am

Re: Is there a working FSM library for micropython

Post by ilium007 » Mon May 03, 2021 12:36 pm

mattyt wrote:
Mon May 03, 2021 2:42 am
I have considered porting transitions - it's a nice library - but ran into the same problems; it's not a trivial port!

One of my colleagues wrote Statechart that works on both Python and MicroPython. It's not as feature-rich as transitions but hopefully it'll satisfy your requirements.
Thanks - I will see if I can make use of this one.

Post Reply