- Espruino Web IDE
- Installing
- Online
- From the Chrome Web Store
- As a Native application
- For Windows 8.1 and later
- For Windows earlier than 8.1
- Native applications for other platforms
- Locally hosted version
- Development version
- Ways of Programming Espruino
- Connection Types
- Bluetooth LE
- Serial / UART
- Bluetooth UART
- WiFi/Ethernet
- Headphone Jack
- Applications
- Espruino Web IDE
- Espruino Command-line tool
- Third party tools
- Serial Terminals
- Find a binary
- Cutting edge
- Flashing
- Bangle.js / Puck.js / Pixl.js / MDBT42Q (NRF52)
- Espruino Original / Pico / WiFi (STM32)
- Other Boards
- After You have Flashed Espruino
- Linux Build — how to connect to the Web Ide
Espruino Web IDE
The Web IDE is the preferred way to program Espruino. It’s got a syntax-highlighted editor as well as support for dynamically loading modules and for upgrading Espruino’s Firmware. You might want to check out other ways of programming Espruino devices.
Installing
Online
The easiest way to use the Web IDE is straight from the Web Browser
You’ll need an up to date version of Chrome, Edge or Opera to get access to Web Bluetooth and Web Serial options.
Note:
- Versions of Windows before Windows 10 don’t support Web Bluetooth. You’ll need to install the Native application (below).
- Web Bluetooth and Web Serial may not be enabled in your Browser by default. Have a look at the Quick Start guide for information on how to enable it.
From the Chrome Web Store
You can install the IDE from the Chrome Web Store
This video is from the Quick Start page, which contains extra information on installing the Web IDE:
Note:
- Google has deprecated the Chrome Web Store and will be removing it during 2021, so this installation method may not be available soon.
- On Windows, the Web IDE from the Chrome Web Store doesn’t support Bluetooth Low Energy, needed for communicating with Bluetooth LE Espruino device. If you’re using Windows you’ll need to use the Native Application (below).
As a Native application
The Web IDE is available as:
Older versions of the IDE (not recommended) are available here
For Windows 8.1 and later
The Native IDE is able to use Windows’ own BLE drivers. The only configuration needed is for you to go to your system’s Bluetooth settings and to click Connect ( Pair on Windows 10) on your Puck.js device. This exposes it to the system and makes sure it shows up in the Web IDE.
For Windows earlier than 8.1
Since Windows versions earlier than 8.1 don’t support Web Bluetooth in the OS, noble (which the Espruino IDE uses) has to be able to access the BLE adaptor directly — so you have to make sure the WinUSB driver is loaded for it (as opposed to a manufacturer-specific driver).
- Download Zadig and run it — it’s just an executable
- Go to Options -> List all Devices
- Choose your BLE adaptor (mine is CSR8510 A10 )
- Make sure WinUSB is set as the driver
- Now when you next run the Native Web IDE and click ‘connect’ in the top left, you should see a list of connectable BLE devices.
Native applications for other platforms
If you require a native version of the IDE for other platforms, you can install the Development version from GitHub (below):
Locally hosted version
If you have a Raspberry Pi, you can install the EspruinoHub software on it, which will allow you to program any Bluetooth LE Espruino devices within range of the Pi straight from a Web Browser on any network-connected computer.
Development version
We only update the Web IDE when we’re sure that everything is working. If you want the ‘Cutting Edge’ version then you can get it directly from GitHub. There are detailed instructions on how to get started on that page.
This page is auto-generated from GitHub. If you see any mistakes or have suggestions, please let us know.
© 2017 Pur3 Ltd (Printable Version) π
Источник
Ways of Programming Espruino
When you’ve got your Espruino board, there are several different ways you can program it — they’re detailed below:
Connection Types
Many Espruino boards have a USB connector, and when you plug this into your PC the board appears as a USB Serial device, which you can then connect to.
This is what we’d suggest programming Espruino devices with.
NOTE: Pixl.js is an exception here — is has a USB connector but it is for charging only.
Bluetooth LE
Puck.js and other Espruino Bluetooth devices present themselves as as Bluetooth LE ‘Nordic UART’ device, and can be connected to and programmed through that. It’s the suggested method of connection for Puck.js.
Adafruit make a Bluetooth LE UART board that can be used to add Bluetooth LE UART capability to other Espruino devices.
Serial / UART
When not connected to a computer by USB, Espruino boards usually open up a serial port on two of their pins at 9600 baud so that they can be programmed via Serial. The pins used for this are detailed in the Pinout section of your board’s specific reference page (eg the Pico, where they’re marked with ! ).
NOTE: ESP32 and ESP8266 devices use 115200 baud for serial, not the 9600 that every other Espruino does.
To save power, Puck.js and other Bluetooth Espruinos only power up the serial port if they detect a voltage on the RX pin at boot time. See Puck.js
Bluetooth UART
The Original Espruino Board has a footprint on the back for an HC-05/HC-06 Bluetooth Module. Once soldered, it uses the standard Serial port (detailed above) for communication. For more information see here.
Standard Bluetooth is not the same as Bluetooth LE, and can’t be used to communicate from a Website.
WiFi/Ethernet
Currently Espruino boards don’t come with Telnet support out of the box. If you’re running Espruino on an ESP8266 then Telnet is enabled.
On other boards, once you have a network connection established you can run:
However, using reset() will break your connection.
Headphone Jack
It is even possible to program Espruino from your headphone jack with a few external components! See here!
Applications
Espruino Web IDE
This is what we’d suggest you use for programming Espruino. It comes in a few flavours:
- Online is what we’re suggesting everyone use at the moment. It supports Bluetooth LE and USB/Serial based Espruinos. It is amazingly easy to use (just go here in Chrome).
- Chrome Web App — allows you to install the IDE locally on your computer. However Google will be disabling Chrome Apps in the near future so we’re not recommending this for now.
- Native App allows you to install the Web IDE and run it locally on Windows (it’s needed for programming Bluetooth LE Espruinos on Windows 7 or earlier).
- Locally hosted IDE can be run on a Raspberry Pi, and can allow you to program Bluetooth Espruino devices through any Web Browser that has access to your local network.
Despite being called a ‘Web IDE’, the IDE itself (including the fully online version) can function without an internet connection. If you’re using modules you may need to download ‘offline data’ under settings first though!
Espruino Command-line tool
If you have node.js with npm you can install the Espruino command-line tools with npm install -g espruino .
These support USB, Serial, Bluetooth UART (once paired), Bluetooth LE, and Telnet.
Third party tools
There are also several third party tools for Espruino available. Some of these may not provide some of the features (like module loading) that are used by tutorials and example code on the Espruino website, and may refuse to upload code that isn’t formatted in a K&R style.
- DroidScript lets you control/program an Espruino from an Android phone
- node-espruino is a node.js command-line tool for Espruino
- espruino-cli is another node.js command-line tool for Espruino. It may not work on newer versions of Node.js
Serial Terminals
You can even program Espruino directly from a Terminal application (if using Serial or Telnet), you’ll just be lacking some of the code upload features. See Alternative Terminal Apps for more information.
This page is auto-generated from GitHub. If you see any mistakes or have suggestions, please let us know.
© 2017 Pur3 Ltd (Printable Version) π
Источник
Find a binary
Choose your board from the list below to see the firmwares available for download:
Cutting edge
We try to release new versions of Espruino every few weeks. However if you can’t wait that long, you can get versions that are compiled directly from the GitHub repository after each commit.
For most boards (including all official Espruino boards), you can download the absolute latest binary using the ‘finder’ above or directly from http://www.espruino.com/binaries/travis/master. You can also browse by Git commit hash.
Flashing
Bangle.js / Puck.js / Pixl.js / MDBT42Q (NRF52)
Please see the instructions specific to your board:
Espruino Original / Pico / WiFi (STM32)
We’d strongly recommend that you use the Chrome Web IDE which has a flasher (and firmware download) built-in. Downloading up to date firmware is as easy as clicking the Settings button, then Flasher , then Flash Firmware . To flash a ‘cutting edge’ or older binary, simply:
- Find the .bin file that you wish to flash online, right-click on it and Copy Link Address .
- Click the Settings button, then Flasher .
- Paste the URL into the text box under Advanced Firmware Update
- Click the Advanced Flash Firmware button
If you absolutely don’t want or can’t do this then do the following on Linux or MacOS:
- Open a Terminal Window
- Make sure you have Python installed (type python — help and see if anything happens)
- Download the stm32loader.py Python script from https://github.com/espruino/Espruino/blob/master/scripts/stm32loader.py
- Run python stm32loader . py -k — p MySerialPort — evw espruino_for_your_device . bin
- On Mac OS, MySerialPort will probably look a lot like /dev/tty.usbmodem### where ### is a number. You can use the ‘Tab’ key to autocomplete once you have typed /dev/tty.usbserial
- On Linux, MySerialPort will probably look a lot like /dev/ttyACM# where # is a number. If you only have one USB-Serial device plugged in, it’s almost certainly /dev/ttyUSB0
- Note the -k flag above. This is specific to Espruino rev 1.3 Boards and helps to ensure that the USB link is reliable during flashing.
You can also completely overwrite Espruino’s bootloader using the Serial Bootloader instructions, but you’ll need a USB-TTL converter for this.
Other Boards
Please see the Other Boards page for more information.
After You have Flashed Espruino
See Quick Start for instructions on how to get started!
Источник
Linux Build — how to connect to the Web Ide
I’ve built using these instructions in a linux VM:
The exe spins up:
How do I connect with the Web ide?
I tried adding the IP of the VM under communications > Connect over Ip Address, however the instance is not found.
Do you need to set up a virtual com port, or can connect via IP to a Linux instance.
I’m hoping the VM version will be a lot more snappy for development — especially uploading when developing modules!
I have checked telnet is not running — well it doesn’t answer on :
I think @tve made the default telnet port on Linux 2323 — info here
On Linux you can’t create a port below 1000 without admin priviledges, and generally you don’t want to have to run Espruino like that.
Just typing 192.168.69.12:2323 into the port list should do it.
Thanks for replying
hmm. nobody home with:
or adding to the web ide..
Also, is this a concern — and what is the cause?
WARNING: jsnative.c sanity check failed (int-float-int passing)
Thanks to @MaBe, it turns out the Makefile had the telnet off by default, need to do a pull request and update!
BOARD=LINUX
LINUX=1
USE_FILESYSTEM=1
USE_HASHLIB=1
USE_GRAPHICS=1
USE_CRYPTO=1
USE_TLS=1
#USE_TELNET=1 # enable telnet to have it listen on port 2323 as JS console
#USE_LCD_SDL=1
USE_TELNET=1 # enable telnet to have it listen on port 2323 as JS console
WARNING: jsnative.c sanity check failed (int-float-int passing)
root@esp8266-VirtualBox:/home/esp8266/Espruino/Espruino# uname -a
Linux esp8266-VirtualBox 3.19.0-25-generic #26
14.04.1-Ubuntu SMP Fri Jul 24 21:18:00 UTC 2015 i686 i686 i686 GNU/Linux`
root@esp8266-VirtualBox:/home/esp8266/Espruino/Espruino# gcc -v
Using built-in specs.
Ok on this system:
So I’m wondering if it a gcc version thing?
Ahh, thanks for letting me know. I guess I’m not 100% sure if it should be on by default then, since it’s a massive security hole if anyone is currently using Espruino and isn’t expecting a port to be opened.
You can always do USE_TELNET=1 make — although that should be documented. Ideally it would be a command-line option.
For int-float-int passing — that’s interesting. It’s referring to what happens if you call a function that takes those 3 arguments. It could be an issue with 32 bit x86 — I checked here and it happens on a real system too.
It’s not a huge deal since it’s actually pretty rare that particular argument format is used — I doubt you’d notice a problem. If you do come across it, you’ll notice that some of the arguments get corrupted, but it won’t cause a crash or anything.
When you post stuff like that up in future, please can you try and surround it in the 3 backticks? As it is, it’s a real pain to look through and see what’s text you’ve written and what’s command output.
I did try to use back ticks, but it went bung, so I removed them!
I thought I would add now on the iPad, however the character isn’t on the keyboard!
For the Linux build is there any other way of loading code via the ide, if there isn’t — that’s why I was expecting it to be on by default. Can it be called a security hole if it’s not on a default port?
As you say documenting makes all the difference!
I updated the gcc compiler on the 32 bit system — it made no difference
I did try to use back ticks
You probably need an empty line before and after — markdown is a pain like that!
For the Linux build is there any other way of loading code via the ide,
Kind of. You can set Linux up such that Espruino auto-runs and is accessible using a telnet server — There was a post on the forum about it. @tve only added the internal server relatively recently.
Can it be called a security hole if it’s not on a default port?
I imagine so, yes. If I could port-scan your PC and then access it remotely with no password, I think that’s something you’d want to fix 🙂
IMO the command-line option would be the way to go, and it can be documented in —help and also the Telnet docs I linked in my first post
IMO the command-line option would be the way to go
and also the Telnet docs I linked in my first post
http://www.espruino.com/Reference#Telnet
I guess it’s making the association that the Telnet server implementation is what the web IDE is using, perhaps that could be spelt out.
I wanted to use the telnet service on linux to run some tests (I think it was to make sure that the service wasn’t tied to anything specific in the esp8266), so I made the changes necessary to be able to enable it, but I didn’t want to open up the port in general given the security issues.
Источник