-
• #2
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
thenespruino -d mydevice -w file.js
- which will give you a REPL and will the automatically uploadfile.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.
-
• #3
@Gordon I appreciate you being very open about this.
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).
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).
Thanks!
-
• #4
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.
-
• #5
@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.
-
• #6
"more production ready" FW
So what is missing on Espruino for productive use?
-
• #7
@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).
-
• #8
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:
https://github.com/olliephillips/espruingo
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.
-
• #9
Thanks @Ollie I will look at it, in meantime - I got finally
espruino cli
"sort of" working and I quickly did this.https://github.com/pankleks/espruino-vsc-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. -
• #10
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?
-
• #12
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.
-
• #13
I will.
-
• #14
[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.
-
• #15
Fixed wrong link in previous post. - sft
-
• #16
Ok, I'm back. Thanks for the posts/PRs about the CLI tools.
Maybe a good idea would be to design next Espruino board around ESP32
I have considered this, and it has been asked a few times, but the issue I have reading between the lines (correct me if I'm wrong here), is you're basically saying: "why don't you sell a board using ESP32 so it becomes better supported. I'm sure someone will buy it, but I already have a bunch of ESP32 that I'll use"
I guess if you're feeling nice you might buy one Espruino board, but realistically you're going to use other people's ESP32 boards for most stuff. If you have a problem on those then you might maybe try it on the Espruino board before posting about a problem, but you'd basically be producing me £5 in profit but then asking for support on 10+ ESP32 made by someone else.
It's what happens to a small extent now with nRF52 and STM32 and I imagine ESP32 would be very similar.
So from my point of view I'll do a bunch of work and will sell maybe a few hundred ESP32 boards, but I'm then likely to get inundated by support requests from users of other ESP32 boards. I like ESP32 but whichever way I look at it, it just doesn't make sense to support (unless I make the 'supported' ESP32 version closed source, which I guess isn't what you want).
-
• #17
Thanks @Gordon for being very open and transparent about this - I respect that.
Well to some extent you read me correct "between the lines".
But my line of thinking is different. I base it on 2 assumptions:
- you can buy cheaper STM32 boards too - so "risk" of not buying official board is similar
- ESP is much more popular than STM
So just by simple extrapolation you should have more boards sales, more project popularity (and all what goes behind it) - by how much - in theory by as much as ESP is more popular than STM.
Don't know how to evaluate this, but this is what google says:
https://trends.google.com/trends/explore?q=%2Fm%2F0hn9tdq,%2Fg%2F11c5368jrl,%2Fg%2F11c3kq9gl3But in the end it's just theory, and I'm by far not an expert - just a thought:)
- you can buy cheaper STM32 boards too - so "risk" of not buying official board is similar
-
• #18
Selling ESP could generate some extra cashflow - however at prices starting at USD1.89 in China I can't see a huge volume or margin. And I can't see how it would help to raise popularity.
If ESP shall be officially supported boards is yet another question. -
• #19
Regarding google trends:
0: try adding arduino, even ESP8266 pretty much disappears :)
1: STM32s were available 10 years ago, those are "just Cortex M chips", available from multiple manufacturers. Lots of documentation. Not some exotic architecture almost no-one heard about.
2: Google searches can be a metric of wtf/minute :)IMO a big user base of ESP8266 and ESP32 is arduino and home automation users. You just set up you home automation system of choice, config things, and don't really program the boards, just use them...
To add to @maze1980's point: I do have a couple of ESP32 boards, because well they were cheap direct from china. I live in Hungary, ppl in US or West-EU have more money & may think differently. But looks like a lot of people from richer countries buy from China as well.
I think it's hard to compete money-vise with direct order from China. You avoid customs fees + VAT + taxes to start with. For example a TTGO ESP32 LORA board with display + LiPo charger + SD socket is cheaper than a simple ESP32 DevkitC + lora chip thru Mouser or Farnell. -
• #20
And one more thing: ESP32 is not a perfect one-size-fits-all solution:
- it's power hungry (even without Wifi)
- looking at Coremark benchmark results looks like it slower per MHz compared to Cortex M4 chips.
- It's ADC is far from perfect (slow, nonlinearity at low values) And looking at Espressif's SDK looks like it's software driven. You can sample, do averaging and transfer results to DMA on a Cortex M without CPU usage.
But it's cheap, especially boards from china are cheap. And has Wifi.
- it's power hungry (even without Wifi)
-
• #21
Oh, something about open source software & it's sustainability:
If some are not aware of the situation, it goes to comical and sad point where a developer publishing FOSS project gets a message from someone at a big company and telling them to fix an issue that's holding back their entire team. Of course no support from the company...
More details in this post.A bigger community could help, if that bigger community includes new contributors with enough free time.
Maybe a software-only kickstarter, like Damien George did with ESP8266?
Or dive in all-in, and design something with the new ESP32-S2. Might be slightly risky :)
-
• #22
Sorry for the delay replying to this...
you can buy cheaper STM32 boards too - so "risk" of not buying official board is similar
It's true, but STM32s come in all flavours, so it's always been a bit hit and miss trying to just buy one and get Espruino firmware for it. By comparison you can just google 'ESP8266', buy the cheapest one you can find and run a pre-built Espruino firmware on it straight away.
I totally agree with you that providing 'official' Espruino builds for ESP8266/32 would make Espruino more popular. The issue for me is I'm not VC-funded or anything so I'm not specifically after as many users as possible - what I'm after is finding a way to make Espruino sustainable, and having loads of non-paying users has pretty much the opposite effect :(
The software KickStarter idea always seemed like a good one. The issue for me really was how to handle support - because a software Kickstarter might pay for 6 months of work if I'm really lucky, but after that there will still be loads of emails, forum posts and GitHub issues that then I'm expected to do for free.
I quite liked the idea of a KickStarter based around the idea of a web service (so you could program all the boards direct from espruino.com) but I don't think that's what anyone asking for a proper Espruino port actually wants?
Honestly if Espressif had cared even a tiny bit about Espruino on their devices then I'd be more inclined to take a risk and do something, but there's been nothing from them despite me trying repeatedly to have some kind of conversation with them. By contrast I've had people at ST and Nordic actually reach out to me to ensure that engineers could answer any queries I had.
ppl in US or West-EU have more money & may think differently
Maybe some have more money, but I think a lot of 'makers' would rather save money by doing something themselves than by buying it - it's part of the reason we do it so it's not surprising that things like ESP8266 are so popular.
That post you linked is quite interesting @AkosLukacs - I've been lucky with Espruino that the board sales prop everything up, but even so I wouldn't be able to make it sustainable if I hired someone else, wasn't working from home, or was actually on an industry-standard wage.
-
• #23
SW kickstarter paying for 6 months -> you could try to ask for more money :) But yes, I see the point, ESP8266 has been around for years now...
A couple of days ago Espressif sent 50 beta boards of their new micro. At least one landed at a microptyhon dev.
Just asking: try to push some community "pressure" on Espressif? Or without explicit support from Espressif, that wouldn't help much? -
• #24
An idea which has occurred to me a few times - what about a bundle?
You bundle an Epruino Wifi (or maybe a couple) with say 3 or 5 ESP8266 boards with Espruino installed on them.
The pitch is that you prototype on an official board, but ultimately stick an ESP8266 into the final application. I've done this and I imagine others have too. It's cost prohibitive to lose my Espruino Wifi in say a remote control car for the kids, but it's nice to get things working on your breadboard with the Espruino Wifi.
With a bundle you sell more official boards, and support that board but make some margin on the ESP8266 as users don't have to faff with flashing it. Makers might go for the convenience of a bundle?
I think regardless of whether you support ESP8226/ESp32 you could make some margin off pre-installed boards? Is a £3 board worth £7, £8 or £10 with Espruino installed on it. For some users I think the answer is definitely yes.
-
• #25
I think it's telling that the original NodeMCU team all dropped the project, because despite it being basically the go-to way to do stuff on ESP8266, nobody bought their boards and Espressif wasn't any help.
try to push some community "pressure" on Espressif?
I do try and do the odd poke for "maybe you should let them know you're using Espruino" but I'm not really sure how to get more people to prod them.
I got to the point of talking to some people inside Espressif, they asked for a bunch of detailed information about it and the amount of people using it, and then they didn't even bother to respond when I gave them that despite repeated pokes.
bundle an Epruino Wifi (or maybe a couple) with say 3 or 5 ESP8266 boards
I think if I were willing to say 'there's no support for this board' then yes, I could sell pre-flashed ESP8266/ESP32. I just feel a bit weird about doing that and I bet I'd get people asking for support saying "I bought this".
Of course the real win would be being able to make $1/board off ESP8266/32 that were purchased in 100s for schools or products, but the only way to do that would be to have some part of the firmware that's closed source like Neonious one do (maybe serving the IDE up over HTTP?).
Would you personally buy a pre-flashed ESP8266 though? I think it's mainly the hacker mentality that most people would rather save the £3 and do the work themselves :)
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.
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.
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.