You are reading a single comment by @benjaminbenben and its replies. Click here to read the full conversation.
  • I've been playing around with building a chat ui for connecting to Espruino boards.

    https://benjaminbenben.com/microchat/

    It's not quite ready, and it's broken in a few ways but I wanted to share it so that I don't disappear down a rabbit hole with it!

    When you add a device and it's like a "contact", and then you can start a session which feels like a "chat". Currently I'm showing a terminal session in the ui, but I've got plans to make it more message based (I've got a pretty neat wrapper for rpc functions).

    Just now I'm showing the device name, but I'm planning to make that editable so you can have "My Pink Neopixel Puck" and some notes about what you've got attached. Because it's url based, you can bookmark/link a particular device.

    So far, the UX seems to work pretty well. It feels quite natural to browse devices without opening up the BLE dialog. And when you decide to connect, I'm able to limit the dialog so it only shows the device you're looking for. Reconnecting on reload feels pretty natural. It sounds like there's some device api in the pipeline that might make it even cleaner.

    I'm thinking this UI might give a pretty good route for extending beyond repl interactions. You could have something like slack slash commands to perform more complex tasks.

    With the implementation, I started with with puck.js library, though I ended up extracting bits of that into my own Socket class so that I could separate devices from creating sockets. It's a bit hairy at the moment, but seems like it's going to work okay.


    2 Attachments

    • Screenshot 2021-02-22 at 12.27.11.png
    • Screenshot 2021-02-22 at 11.54.07.png
About