Project future

Posted on
  • Hello All,

    First of all thank you for your work - I love this project and please consider below as attempt to make it better (in my personal opinion).

    I'm working on microcontroller projects for 2-3 years and since then every few months I'm trying Espruino. I'm super happy to see incremental improvements and things fixed. However since the beginning I faced 2 main issues - which I think are still not addressed. And I would love to learn your approach to these.

    1. VSCode integration. Web IDE is great to kickoff, but honestly anything longer than 50 lines is painful.
      I think one of the major reasons for Platform.IO popularity was VSCode integration. Having official VSCode plugin + TypeScript integration would be a killer.

    2. ESP is still considered as 2'nd grade citizen (IMO). I think I tried most of the Espruino releases on both ESP8266 and ESP32 and always suffered with some stability issues. Not mentioning that some of framework and board features are still not supported.
      I do understand that business model is around own boards, but reality is that ESP is unbeatable mix of power and cost, and main competitors have better support for these boards. Personally this was the main reasons why for many projects I had to switch to other FW.

    Again please do not read this as negative feedback, it's more personal explanation why - even if I love to use Espruino, I still have to work with other frameworks with less friendly language.

    I would love to learn your approach to above and how we can help.

  • Hi,

    There are command-line tools which I believe are pretty easy to add to VSCode, and I have seen them used for cross-compilation of TypeScript as well. It could just do with a bit of documentation which I'm afraid I haven't got around to.

    Although it's pretty easy to do npm install -g espruino then espruino -d mydevice -w file.js - which will give you a REPL and will the automatically upload file.js every time you save it.

    If someone would like to contribute an actual VSCode plugin that glued the espruino npm library to VSCode then that would be great though.

    However while I'm all for making Espruino easier to use on other IDEs, the main focus for me is really on lowering that "time to blink" number by making it super-easy to get started (which it seems is what draws most users to the platform).

    ESP is still considered as 2'nd grade citizen (IMO).

    That's because I have never made even a cent from any work I have put into the port for Espressif's chips (although I do receive some extremely generous support from some folks via Patreon, several of which I know use ESPxx chips). There's an argument to be made that ESP32/8266 sales actually dig into sales of the boards I make money off too, so it's very hard for me to justify putting significant work into Espressif chips when I could put it into boards that do make money.

    The ESP32/ESP8266 ports basically exist purely because of the extremely hard work of a handful of individuals, but at the end of the day it's a hobby for them so if they don't have time or there's a niggle that isn't fun to fix, it doesn't get fixed. All I can say if if you want something fixed, have a go yourself and contribute it back to GitHub - that's the great thing about open source.

    If you want to help and don't feel you can do that, you could sponsor me to fix the issues you have with the ports, or could always make a fuss to Espressif - if even a fraction of the thousands of ESP32/8266 Espruino users actually let them know then they might consider supporting some work to improve Espruino on it. Other chip manufacturers have done that in the past, just not Espressif.

  • @Gordon I appreciate you being very open about this.

    1. As for VSCode, I might be actually able to help here - been doing some VSC plugins some time ago. I'm aware about espruino npm but so far I was not able to install it without errors on any environment - which was discouraging, but I will give it a shot again (I raised issues on github already).

    2. I understand your approach to ESP given amount of effort needed. On the other hand, I can't shake feeling that lack of good suport for most commonly used boards is significantly decreasing potential users and more users is better community, better support - basically more noise around the project. Maybe a good idea would be to design next Espruino board around ESP32 (you can still sell own board and at the same time improve ESP support) - new ESP32 WROVER looks like solid chip for "heavier" frameworks.

    Became a patreon today - and very happy to help with VSC plugin (unfortunately within very limited time).


  • My thoughts:

    On a first-time-to-blink, it's hard to beat the web-ide, I think it's a pretty cool piece of software.
    But I do agree that VSCode is powerful. I use it for most of my day-job and most of Espruino development + the Web ide REPL to tweak the code on the fly. The REPL is one of the best features of Espruino!
    A nicer SVCode integration would be nice of course :)

    Dunno, maybe the web ide as the default beginner option, and VSCode for advanced users? Although the web ide can do "everything", found it a bit clumsy for multiple files, and VSCode has configurable keyboard shortcuts.
    Or replace codemirror with monaco editor? Probably there would be a lot of accidental complexity on that path. Also probably VSCode would have better support for multi file editing, wouldn't have to reinvent that many wheels. And a full-blown VSCode plugin would sound "bigger&better" than a "Web Ide 2.0".

    ESP - I have mixed feelings: ESP8266 is severely limited IMO. Wifi handling eats up most of it's resources. But -if we ignore the security part - ppl have done great home automation projects with it.
    As far as I have seen (might be wrong) even the ESP32 doesn't handle https certificates properly: Most samples I have seen just ignore verification, or hardcode certificate thumbprints & hope for the best.
    But looks like there is nina-fw that turns the ESP32 into a dedicated wifi - internet chip. And does have root certificates burnt in. Better, but still can't do anything if a root cert is expired / revoked / replaced...
    ESP32's Bluetooth is not 100% stable, but looks like people are "OK" with it, just restart it every day. Meh...
    Also, has anyone seen a real-world use of the two cores of the ESP32?
    And uses a lot of power even without wifi.

    Probably boils down to resources (and money and how do you get income). For example (at least from what's visible to me) Adafruit sells microcontroller boards + Raspberries, and accessories (sensors, LEDs, actuators, radios, batteries, boxes, etc) that can be used for both. They even have their own IOT services, and board that uses an ESP32 as a communication coprocessor.
    Circuit python is only supported on their boards (no ESP32 at all). I guess selling "everything" gives enough income, and standing on top of Arduino and Micro/Circuit Python gives them a lot of users.

    But I guess Gordon probably knows more about business models than me.

  • @AkosLukacs just to be on same page - I'm not saying to exchange WebIDE with VSC, just add alternative. I'm actually doing same thing - building my project in VSC + TypeScript then copy & paste generated code to WebIDE to upload and REPL. Using espruino cli would solve this, but either I'm missing something or it simply does not work.

    As for ESP32 -> I don't have experience with Bluetooth, but I have multiple boards running for months on WiFI (Arduino code) without any issues.

    As for cores - well actually frameworks like Espruino could nicely use multi-cores in background to split some processing of event loop.

    Well - in the end I guess entire discussion leads to simple question about target of the project - if it's to get people into micro-controller world as easy as possible - it's spot on. Question remains what person who wish to go deeper should do. Today I think most of the people may switch to other "more production ready" FW.

  • "more production ready" FW

    So what is missing on Espruino for productive use?

  • @MaBe my productivity is hit by WebIDE, i like to have intelisense, better multi-file support etc. What hit's my "production ready feeling" is unstable port for ESP.

    Solving first "issue" will help everyone, second is for ESP users only - but due to popularity of ESP I guess there are lot of us (also competitor FW seems to focus on ESP mostly - so there must be something to it).

  • I can see both sides of the argument for support and not supporting ESP more. I think I've argued that more mainstream support for ESP would help the Espruino cause myself, but I totally get that Gordon makes a living from this, so he will channel effort into what pays his wages, and he will know best what those channels are :)

    @pankleks I can promise nothing but you might have a look at this, which does this same thing as the espruino cli:Ā­go

    It's not been maintained recently, nor used much by me, so I don't know how it copes with modern Espruino, but it used to work very well. Maybe if there are issues it would be worth getting it back into shape.

  • Thanks @Ollie I will look at it, in meantime - I got finally espruino cli "sort of" working and I quickly did this.Ā­-templ

    Very, very much WIP but maybe could be already useful for someone.

    I can compile my projects with TSC, send it to the board and REPL, all directly from VSC.

    @Gordon I submited some PR's to espruino cli - to be honest seeing already some more issues.

  • I think I tried most of the Espruino releases on both ESP8266 and ESP32 and always suffered with some stability issues.

    I didn't run into any issues on ESP8266 yet, however I didn't work with 1.x releases. Did you report all bugs?

  • @maze1980
    With ESP32 the main issue I have is restarting randomly. I believe it might have something to do with chip overheating - just blinking code get ESP32 to 65 C. In comparison blinking sketch on Arduino (or even Mircopython) keeps ESP cool (~45-50 C).

  • Did you report the bug in the ESP32 forum? To keep this thread on the overall project status overall I wouldn't discuss any specific bugs here.

  • I will.

  • [EDITED link - thanks @Robin for pointing it out)

    @pankleks - you may enjoy reading this conversation about Multiple files and importing libraries,... also talking about other/any IDE/Editor and automating/scripting upload.

  • Fixed wrong link in previous post. - sft

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

Project future

Posted by Avatar for pankleks @pankleks