-
Thanks both @Robin and @Gordon for the positive response and helpfull advice. Robins tutorial and the features page and set alternative idea were just what was needed. Im working a fork of XState/fsm in github (xstate-fsm-Espruino) which is very much WIP.
Hoping bloat will not be an issues as Xstate is designed with that risk in mind.
I got a positive reponse from davidkpiano (author of Xstate) also on thier Discord community. https://discordapp.com/channels/795785288994652170/810916847573532742/878607258785808385
-
Hello,
Im new to Espruino but have a good background in computer science and have been working since I retired, to learn a sound microcontroller platform for some projects I have in mind. Ive honed in on the xstate finite state machine https://xstate.js.org/docs/packages/xstate-fsm/ as a great framework for structuing code for automation applications. Ive had great success with this on Raspberry pi running Node. But am trying now to find a lower total cost option. Ive had some success with xstate on low.js on esp32, but not many drivers available,extent of open source is limited and seems to have a small community.So im trying to port xstate/fsm to Espruino* whcih does not seem so limited. It is a challange for my experience. But I have got a basic port and some simple xstate machine configs to run. Generally the issues Im having with the more sophisticated examples are Javascript features failing execution in Espruino. Some ive cracked with work arounds eg (module exports format, functions with optional parameters, multiple const defs in array format) and some are proving more difficult eg Set objects.
Not sure how successfull this will be but happy to share all results, write up cases and test the work on Espruino boards (im using esp32 initially) and def would like to publish the xstate/fsm port in the tested modules.
Does this work seem benneficial to the community ??
Is there a list anywhere of what javascript features are or are not in scope at them moment and where to best ask/confirm or note any apparent gaps ?? Any pointers for using the forum or github issues appreciated.
- I appreciate there is an FSM in the existing device modules but would like a few more of the features available in xstate (eg named events, triggering specific state changes) and xstate appears to be getting lots of traction with a large community.
Regards,
Simon - I appreciate there is an FSM in the existing device modules but would like a few more of the features available in xstate (eg named events, triggering specific state changes) and xstate appears to be getting lots of traction with a large community.
-
Retired Solution Architect (Xerox - Imaging Services)
Working on implementing Xstate
https://xstate.js.org/docs/packages/xstate-fsm/
on Microcontrollers for improving Service Delivery
Hi, progressing slowly but surely with xstate for Espruino. But got a problem trying to find a method in Espruino to return the name of a function.
Its not a show stopper , but any ideas would be appreciated.