ArticleslgStudy

computer science

Espruino

Espruino is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Espruino rather than just read about it. In short: Espruino is an open-source JavaScript interpreter for single-board microcontrollers. It is designed for devices with small amounts of RAM (as low as 8 kiB).

Espruino — main illustration
Espruino — illustration

Key takeaways

  • Espruino belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Espruino to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Espruino from memory before moving on to harder problems.

Reference excerpt

Espruino is an open-source JavaScript interpreter for single-board microcontrollers. It is designed for devices with small amounts of RAM (as low as 8 kiB). Espruino implements a large amount of the ECMAScript ES5 spec with parts of the ES6 spec where it is useful in an embedded environment.

Overview Espruino was created by Gordon Williams in 2012 as an attempt to make microcontroller development truly multiplatform. Though initially not open-source, the Espruino firmware was offered as a free download for STM32 microcontrollers. It was made open-source in 2013 after a successful Kickstarter campaign for a development board running the software. Since the original Espruino board, there have been a number of new official development boards including the small USB thumb-drive-sized Espruino Pico, the Wifi-equipped Espruino WiFi, the Puck.js with built-in Bluetooth and the Pixl.js with a built-in LCD and Arduino shield compatibility. Espruino is the operating system used on the BangleJS and BangleJS2 smartwatches. In addition to the official boards, Espruino runs on approximately 40 other types of development boards including the ESP8266. There is a large body of reference material for Espruino including over 100 tutorials as well as the book Making Things Smart which contains a selection of hardware projects that can be created with Espruino-based microcontrollers. To achieve maximal memory efficiency, Espruino executes code from source directly inside the parser, without the use of an Abstract Syntax Tree or intermediate bytecode.

Hardware

The first official development board was the Original Espruino. Later boards are available in a variety of form factors. The Original Espruino was followed by the Espruino Pico, Espruino WiFi, Puck.js and Pixl.js. A breakout board featuring the MDBT42Q Bluetooth LE module, the same used in the Puck.js and Pixl.js, is also available.

Software

Espruino programs are written using JavaScript. The Espruino IDE is available as a web-based app, a Google Chrome App and as a native Windows application. Alternative methods of programming Espruino boards include using terminal programs such as PuTTY on Windows.

License All of Espruino is open source. The different parts are licensed as follows:

Espruino Firmware - Mozilla Public License, version 2.0 Espruino Code Samples - MIT License Espruino Documentation - Creative Commons Attribution-ShareAlike 3.0 Espruino Hardware Design Files - Creative Commons Attribution-ShareAlike 3.0

See also

MicroPython

References

Illustrations

Espruino illustration
Espruino illustration
Espruino illustration
Espruino illustration
Espruino illustration

Worked examples

Example 1 — a first encounter with Espruino

Start with the simplest possible case. Write down what Espruino claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Espruino before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Espruino ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Espruino

In research
Espruino appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Espruino in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Espruino is common in secondary-school and first-year university syllabi. It links to neighbouring topics Internet of things, JavaScript, JavaScript dialect engines, so understanding it makes those chapters shorter.
In everyday life
Look for Espruino outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Espruino” →

How to study Espruino in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Espruino means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Espruino out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Espruino in simple terms?

Espruino is an open-source JavaScript interpreter for single-board microcontrollers. It is designed for devices with small amounts of RAM (as low as 8 kiB).

Why does Espruino matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Espruino?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Espruino.

Tags

  • Internet of things
  • JavaScript
  • JavaScript dialect engines
  • Microcontroller software
  • Microcontrollers
  • Physical computing

Keep exploring