Espruino App Loader

Posted on
  • @gedankenstuecke just made a great website (https://tzovar.as/one-button-tracker/ - forum post here) that allows you to program your Puck.js to be an event tracker.

    It reminded me that @benjaminbenben had suggested a long time ago that we have a website for loading apps onto Espruino devices. At the time I ended up devoting most of my time to Bangle.js, and for that I ended up making the Bangle.js app loader which does a similar thing - but very specifically for Bangle.js. It now has loads of apps on it.

    What does everyone think? Is there a place for a generic Espruino app loader? Would you contribute apps to it?

    I'm thinking:

    • With Web Serial we can target all Espruino devices now, not just the Bluetooth ones.
    • A list of browsable/searchable applications with descriptions, and web pages to configure them if needed
    • Ability to filter applications by what device(s) they work on
    • Allow 'ifdef' lines to let one application target different devices (eg, draw to the screen if there is a screen, use LEDs if not)
    • Link Espruino tutorials with 'upload this now' which allows you to directly upload the code to your device
    • Allow you to click 'edit' and get the code in the Web IDE so you can customise it further before upload
    • Allow you to read saved data off the Espruino (eg. data log, then get the data off into a CSV file or Google Sheets)
    • [Later] allow pre-configuration (e.g. add an LCD to an Espruino Pico, then run apps that needed a display)

    What apps do you think would be worth adding?

    • Bluetooth Beacon configuration
    • Bluetooth/USB HID Button configuration
    • Neopixel patterns
    • Data logging
    • ...?
  • I think that's a really cool idea, as there's probably lots of common use cases and the tutorials already cover quite a lot of them, having an easy way for people to give them a go right away would be really nice!

  • Oh yeah, I remember chatting about that - it'd be brilliant!! I had a bit of a hack into configurable scripts with a countdown timer & LED blink. I also put together some ui sketches but I can't find them.

    Oh wow, more devices with Web Serial would be awesome. And being able to read back data in a nice way would allow some really useful apps.

    With the neopixel app suggestion - if it was a generic app loader, I'd wonder about adding a button to my espruino-pixels page which would be "load this pattern on a puck.js" (though maybe that's already possible with the ide? 🧐)

    When I was thinking before, I was pretty focussed on PuckJS and the angle was "turn my puck into X", so I was thinking Countdown Timer, Music Remote Control, Blinking Light, etc. With different devices, and connected things there'd be a whole lot more!

    I'd be up for contributing apps, though also let me know if I can help with design/build of the app loader - I'd love to be involved in that!

  • That sounds great - at the moment with the Bangle.js loader you can do a custom.html file that basically gets loaded into an iframe and then posts the finished JavaScript back to be uploaded. The espruino-pixels page is basically perfect for that.

    From the point of view of reducing workload/bugs and ensuring new features (ratings/etc) appear on both, using the Bangle.js app loader's code seems like the best bet. Maybe moving it to a shared git module would be best? Any other thoughts?

    There are a few obvious differences I guess:

    • Using Web Serial as well as Web Bluetooth (but there's a library for that, done at the same hackathon I think @benjaminbenben?).
    • Saving direct to run at boot, not to a named app (but maybe this should be an option for Pixl.js at least!)
    • Filtering by device type (maybe detect at connection and then display only the relevant apps)

    But it feels like 90% of the code would be the same...

    Another option is just to use the Bangle.js app loader for all Espruino devices - some of the Bangle.js apps would run as-is on other devices. I think perhaps that's a step too far though? Folks with Bangle.js are going to want a simple, non-confusing way to load apps.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Espruino App Loader

Posted by Avatar for Gordon @Gordon

Actions