• 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/xsta­te-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

  • Wed 2021.08.18

    Is there a list anywhere of what javascript features are or are not in scope at them moment
    Javascript features failing execution

    Hi Simon, @SimonGAndrews welcome to the world of Espruino!

    Not sure if this is what you are after, as I'm not familiar with the described environment.

    http://www.espruino.com/Features


    Any pointers for using the forum

    A few years back I started to notice a pattern of questions individuals always seemed to ask, so I put together helpful hints for others to find insight.

    At the top of the forum topic 'Tutorials'

    Tutorials

    or open that thread and search the plethora of links that many usually require halfway down the page:

    Writing an effective forum post


    where to best ask/confirm or note any apparent gaps?

    Right here for starters. If a really specific topic stands out, then maybe a new thread within either the ESP32 of if language specific beneath that under other, would assist others in the future. The moderator will coach or move when appropriate, so no worries. We are all easy going here.

About

Avatar for Robin @Robin started