Espurino: JavaScript for microcontrollers

Atmel microcontroller, Espurino

You have probably ever heard Spurine, as this project has been baptized with the name of a politician and military man of the Roman Republic. Or maybe you have come to this article looking for more information because you already know it and want to start using it.

Be that as it may, I will try to give you the keys about what Espurino is and what it could do for you for your future projects, as well as some recommendations to learn how to program it in a simple way.

A while ago we told you about Anaconda, another interesting project for Python lovers who wanted program arduino boards with this programming language that has become so popular. Something similar to what it does MicroPython, but this time, with Espurino, it brings you another new opportunity using a different language ...

What is Espurino?


Spurine is an open source project to create a JavaScript programming language interpreter for microcontrollers. That is, this complete IDE has been designed to be able to program devices with a programmable microcontroller that have small RAM memories, such as some that only have 8kB and are widely used in many embedded devices.

The Espurino project was created by Gordon Williams in 2012, as an attempt to allow the development of microcontrollers on multiple platforms. Initially it was not open source, it simply offered a free firmware download for STM32 MCUs.

In 2013 the project would take a very important step, becoming open source after a very successful funding campaign on the Kickstarter crowdfunding platform. This campaign went beyond the initial development environment, seeking funds to also manufacture boards that could support this software.

Espurino's firmware is now licensed under the Mozilla Public License 2.0, while the sample codes are under the MIT License, the documentation under Creative Commons Attribution-ShareAlike 3.0, and the hardware design files under the latter as well.

This is how the Espurino official badge, which would be followed by numerous releases of other versions as has happened with other similar projects such as Arduino. In addition, these boards also featured compatibility for Arduino-compatible shields, which gives them some really interesting capabilities for makers and DIYers.

Currently the project has some popularity, with an important development community and a multitude of tutorials and help that you can find on the Internet. Therefore, if you like JS and programming microcontrollers, you have never had it so easy ...

Project source code - GitHub

Official Web site - Spurine

Firmware - Download (for the different plates)

JavaScript? Microcontroller?

If you have started in this world, you may be wondering what are those terms or what they can contribute to your projects. If you read us frequently you will already know what a microcontroller is, and surely you also know JavaScript or JS.

Un microcontroller, also called MCU (Micro Controller Unit), is a programmable chip capable of executing certain orders from memory. This may also match the definition of a CPU, but in the case of an MCU, they are usually less advanced and powerful, targeting certain specific tasks, such as embedded devices.

In addition, a difference from a CPU, the microcontroller is an integrated circuit that includes the CPU itself, as well as other functional blocks such as memory and the I / O system. I mean, it's basically a complete computer on a single chip ...

Therefore, you will have a cheap and simple device that you can program so that its inputs and outputs act as you want and thus generate actions. You can make it receive information from external sensors or actuators, and based on that send certain signals through its outputs to others Electronic components connected.

As for the JavaScript, it is an interpreted language. In other words, unlike compiled ones that after compilation generate a binary that can be executed by a CPU, in the case of interpreted scripts, an intermediary software called an interpreter will be needed, which will interpret the commands of the code to "tell" the CPU what what it has to do.

JS It has become very important today due to the multiple applications it has, especially in web apps. In fact, it was initially developed by Netscape's Brendan Eich (then it was called Mocha, then renamed LiveScript, and finally JavaScript).

That popularity has led to a large number of interested programmers and users in JavaScript, and projects like Espurino can bring all of them closer to programming microcontrollers with it.

By the way, for get started with Espurino IDE, you will not have to install anything in your operating system, it is a web-based environment that you can use from right here in your favorite web browser.

Although various web browsers can be used, to flash the firmware of these boards it is recommended to use Chrome and a plugin called Espurino Web IDE that is recommended from the official website and that you can get for your Chrome at this link.

How to learn JavaScript?

If you still do not know how to program in JavaScript, you should know that, as in any other language, there are books for learning, courses, video tutorials, and a huge amount of resources to learn for free. But there is another resource that is perhaps less talked about and that is especially interesting for making gamification the learning procedure of JS.

I am referring to the videogames that help you learn to program with certain programming languages, including JS. With these games, instead of using the keyboard or mouse to direct the character or interact with the virtual environment, what you will have is an interpreter of this language on one side of the screen and where you will begin to enter code (starting with the simplest even the most advanced).

In this way, you will control the game using programming language, so during your games you will go learning almost without realizing it and as you advance in the missions your knowledge will grow.

If you are interested in this way of learning to start with Espurino, here I leave you some resources to learn JavaScript using games:

Official Espurino plates

Spurine plates

After the first development of the plate Espurino's original came more projects available to use with the IDE and JS. If you want to know more about them, here is an introduction to each one:

  • Espurino (original): it is the original plate, the first to be designed under this project. Their characteristics are:
    • STM32F103RCT6 32-bit 72Mhz ARM Cortex-M3 MCU
    • 256Kb of flash memory, 28Kb of RAM
    • microUSB, SD connector, and JST PHR-2 external battery connector
    • Red, blue and green LEDs
    • Pads that allow the connection of Bluetooth modules HC-05
    • 44 GPIO with 26 PWM, 16 ADC, 3 UARTS, 2 SPI, 2 I2C and 2 DACs.
    • Dimensions: 54x41mm
  • Spurino Peak: is a small board with a microcontroller to start running your JavaScript projects and control things in a matter of seconds. It is programmed through its USB interface to load the script you write about the Espurino IDE. In addition, it has an economic price and you can find it with pins and without soldered pins in its heads. More details:
      • 22 GPIO (9 analog input, 21 PWM, 2 serial, 3 SPI and 3 I2C).
      • USB-A connector on board.
      • 2 LEDs and 1 button on the PCB.
      • STM32F401CDU6 32-bit 84Mhz ARM Cortex-M4 MCU
      • Memory: 384 Kb of flash and 96Kb of RAM
      • 33x15mm dimensions
  • Spurino WiFi: It is a practically twin board to the previous one, only that some improvements have been added. For example, its size is 30x23mm, growing to make room for an ESP8266 WiFi chip. In addition, USB has been changed to microUSB, the number of GPIOs has been reduced to 21 (8 analog, 20 PWM, 1 serial, 3 SPI and 3 I2C). On the other hand, the microcontroller has also been boosted, now it is a STM32F411CEU6 32-bit 100Mhz ARM Cortex-M4 with 512kb of flash memory and 128 kb of RAM.
  • Espurino Puck.js: It is basically a Bluetooth smart button that you can program thanks to its internal microcontroller and the interpreter (pre-installed) with JS. In addition, it has a 52832Mhz ARM Cortex-M4 nRF64 SoC with 64kB of RAM and 512Kb of flash, GPIO, NFC tag, MAG3110 magnetometer, IR transmitter, built-in thermometer, as well as light and battery level sensors.
  • Spurino Pixl.js: It is a device similar to the previous one, but instead of a button it is a programmable Bluetooth LE smart screen. Its screen has dimensions of 128 × 64 monochrome, while the rest of the characteristics are similar to the Puck.js.
  • MDBT42Q: it is the same module as Pixl.js and Puck.js, but with a ceramic antenna. The rest of the technical characteristics coincide with the previous two, but without screen or button in this case ...
  • Bangle.js: it is the newest product. It is a wearable, a smart watch or smart watch. You will be able to install apps and develop new functions using JavaScript or a graphical programming language (Blockly). You will only need a web browser to be able to write your codes and upload them to the watch ... In addition, it is waterproof, has Bluetooth, GPS, accelerometer, magnetometer (to quantify the strength and direction of magnetic signals), etc.

If you need buy some of these Espurino plates you can find them in the official website store From this project. You can also find it through a series of distributors officials assigned to the project, such as some famous groceries like Adafruit, etc.

The content of the article adheres to our principles of editorial ethics. To report an error click here!.

Be the first to comment

Leave a Comment

Your email address will not be published. Required fields are marked with *



  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.