Waiting for espruinos, I decoded to start first test on STM32F4Discovery.
I had to spend some time get it running, as usualthe problem was in front of the keyboard.
Anyway, these times are gone.
First start was done with Chrome based IDE. A simple blinking started soon, perfect.
Problem I found was the CPU load.
Connecting to the COM-Port eats CPU like crazy.
Usually Chrome takes 40%, on my AMD quad core with windows 64 and 8GB.
Therefore a search started to compare against a simple terminal:
Putty and others refused to connect to COM port, at the end I got Tera Term running.
BTW, it does not take any remarkable power, so chrome does something strange.
Next step was to write some short snippets.
At that time I missed the IDE, so why not write my own ?
Codemirror is a beautiful starting point, and together with some additional lines, a very, very, very first editor was born. http://www.jumware.com/espruino/espruino.html. Testing ran on FireFox only.
Added are options to
There are some COM-Plugins in the big wide world for Firefox, but I did not get any of them running. Copy & Paste was my solution to this problem. Hopefully the WebSerial API group, mentioned by Florian Bender will be succesful soon.
Anyway, I would like to add some more functions to the editor. One is to give some help to select a board and get informations to choose available pins.
There is a lot of information available in Espruino GitHub. My problem is 1st to understand and 2nd to download, since this would be a cross-Domain call. Easy solution (at least for me) would be a JSON file.
As soon as I get more devices running more snippets will be added.
Thanks! This looks really interesting. I love the underlining and code completion.
Chrome does seem to have some issues with CPU load for Serial ports (but only when connected). Even if this can't be sorted, the Web IDE could be modified to connect, write code, then disconnect, all in one go.
The Web IDE already uses CodeMirror - rather than making your own Web IDE so that we have two competing ones, do you think you might be able to improve the existing one? https://github.com/espruino/EspruinoWebIDE
I think it could be modified quite easily so that it would work inside a normal web browser too (without needing to be a Chrome Web App).
Potentially I could dump that information to JSON files on the Espruino site. Note that for code competion/documentation there is already: http://www.espruino.com/js/keywords.js
I notice you link to the files on EspruinoDocs. Did you know that these are used to generate pages on the Espruino site? For instance https://github.com/espruino/EspruinoDocs/blob/master/devices/Stepper%20Motors.md -> http://www.espruino.com/Stepper+Motors
As well as build_board_docs.py, there's also build_docs.py which builds the whole Reference document up. This could export to JSON quite easily as well - and I wonder if the code completion could be extended with all the built-in functionality.
thanks for the detailled feedback. I did not check the changes you mentioned yet, but I followed your suggestion to add functions to your WEB IDE.
There is a download for testing available at http://www.jumware.com/espruino/webapp/EspruinoWebIDE.zip
Changes, you can find them by searching for comment with "juergen" in.
Its a new button in WEB IDE, which
There are more options than on Espruino homepage.
I checked STM32F4Discovery and found CAN and SD ports.
On some pins I found more devices (e.g. PC10,PC11 are uart and usart)
Any idea what I forgot to check ?
Thanks - this is really awesome! I've hacked around with jslint (js/codemirror/addon/jshint/jshint.js) so that it now allows binary numbers, and have uploaded it to:
If you use git then you might find it easier to keep track of changes. I'll try and get your changes into a 'proper' release when I get a few free moments - and I'll see if I can dump out the documentation in json format too (but that might be a way off!).
At the moment, I think having the buttons to select different bits of code (while cool) is a bit daunting to new users. I think maybe I should have a directory in EspruinoDocs called 'examples' which contains properly curated bits of example code (the stuff in 'code' is a mess and was basically only for my own testing :)
I'm loving the minify + send to Espruino. It works amazingly well - it's staggering what 'advanced' does to your Blinker snippet! Perhaps a simple regular expression replace (something like /0b(+)/parseInt("\1")/) could be applied before sending the code to minify to fix the binary number issue. I should just change the example code though :)
Don't worry about formatting, just type in the text and we'll take care of making sense of it. We will auto-convert links, and if you put asterisks around words we will make them bold.
For a full reference visit the Markdown syntax.
© Espruino, powered by microcosm.
Report a problem