Avatar for SimonGAndrews


Member since Aug 2021 • Last active Aug 2022
  • 3 conversations

Retired Solution Architect (Xerox - Imaging Services)
Working on implementing Xstate
on Microcontrollers for improving Service Delivery

Most recent activity

  • in General
    Avatar for SimonGAndrews

    Move to github discussions sounds positive to me. Improving searching would be a big plus. Lower admin also a plus.

  • in Projects
    Avatar for SimonGAndrews

    so Ive had my implementation of Xstate in Espruino on hold while working on getting USB Host working on Pico (both essential to my project) . But the status of Xstate in Espruino work is well beyond proof of concept and is a point of testing nested states , which are one of the most basic yet usefull extensions of statecharts over simple finite state machines.

    But in parallel the Xstate world is moving on leaps and bounds.
    Now the capability is there to design with drag and drop , inside visual studio, a state chart representation of a finite state engine and generate the javascript code and object definition of the state engine.
    So this means with a small javascript framework in Espruino we would be able to change the logic of our microcontroller in a standard , visual representation, readily transferrible from one Espruino Hardware environment to another. Theres a great vision here. (just got to get USB host working !!)

    check out Xstate when you can and imagine it working in Espruino.

    will update ASAP

  • in Pico / Wifi / Original Espruino
    Avatar for SimonGAndrews

    A little wire wrapping going on in the mean time. :)

  • in Pico / Wifi / Original Espruino
    Avatar for SimonGAndrews

    P.s any advice always appreciated.

  • in Pico / Wifi / Original Espruino
    Avatar for SimonGAndrews

    Quick status ... still putting in lots of hours on this. Steep learning curve for me. Achieved so far,

    • building Espruino for pico on Ubuntu and getting vars for build
    • building Espruino in Stmcube ide with hacked make file.
    • Wired up pico with swd via a Nucleo SWD and so able to run debug via stmcube ide on Espruino interpreter, with power and active console via serial on pico, so can trace thru existing interpreter functionality eg serial.inject. (See pics attached)
    • Started custom lib in Espruino Usbhost , with jswrap_usbhost
    • got standalone stmcubef4 usb host library running with a simple main on discovery board. Can see init and receive data callbacks that need to be implemented in Espruino idle loop via wrapper.
    • Currently copying over usbhost library components from stmcubef4 and trying to build Espruino with them included, issues are newer versions of common files down the usb stack that are shared With existing Espruino usb client stack. Trying to understand and work the overlap. Don’t want to give up on building with both host and client stacks in place.
    • Initial dev target is ‘just’ disable usb client, init usbhost, and print received data to console.
    • I will be seeking advice , in due course, on plumbing in usbhost cdc get data into an usbhost.on(‘data’, callback) via the wrapper functionality. Looks like serial.inject has some clues.
  • Avatar for SimonGAndrews

    Initially , looks like CDC is an easier implementation and needing fewer library files.
    Interested in others view , if you only had one usb class of input. HID or virtual com ?

  • Avatar for SimonGAndrews

    Realised that given my requirement is to input to pico from usb barcode readers that are usually capable of output in virtual com mode, then may only need host CDC capability on the pico and not need host HID also. So will start with host CDC .