You are currently viewing Analyzing Espruino

Analyzing Espruino

Today we would like to bring you an article that gives continuity to the series of previous publications. We want to introduce you to Espruino and make an analysis of its functionalities, uses and advantages.

In 2012 Gordon Williams (software engineer, graduate of Cambridge University and founder of Espruino) is given the task of making the development of microcontrollers multiplatform, the materialization and implementation of this idea was called Espruino.

Such firmware is a JavaScript interpreter which runs on a variety of different microcontrollers, but there are boards that come with the interpreter pre-installed and are the easiest for any newcomer to the subject. There is a Web IDE, which is considered the preferred way of programming by many thanks to its support for dynamic module loading and constant updating. Espruino also has a graphical editor that will allow you to use it even if you cannot program it with code. This editor speeds up and facilitates the creation of simple projects without the need of having any experience.


ESPRUINO VS RASPBERRY PI VS ARDUINO

Espruino is much smaller, more manageable and simpler than its big sisters Raspberry Pi or Arduino and here’s why:

RASPBERRY PI VS ESPRUINO 

Espruino

  1. The Raspberry Pi contains good video capabilities thanks to its graphics memory, unlike Espruino, which lacks this virtue.
  2. It is impossible to reliably program actions in real time on a Raspberry Pi, which makes precise synchronization difficult.
  3. Espruino runs JavaScript: this makes it very accessible and easy for beginners. Raspberry, on the other hand, offers you a variety of programming languages, which is powerful, but can be overwhelming.
  4. RaspPi lacks analog I/O modules, which is compatible with Espruino.
  5. Raspberry Pi requires an SD memory card containing the operating system (Espruino does not).

ESPRUINO VS ARDUINO

Espruino

  1. Espruino boards are smaller than most Arduino boards and are much easier to get started with.
  2. No software needs to be pre-installed on your PC.
  3. While Arduino has low power consumption, the Espruino board is designed with efficiency in mind and consumes 10 times less power when in stand-by (idle) mode.
  4. The use of a JavaScript interpreter means that Espruino does not have to restart when making changes to the code, however, it also means that the execution speed will be a little slower compared to Arduino.

Espruino

 

SAMPLE CODE

Below we leave some fragments of lines of code so that you can appreciate the level of difficulty that has programs this type of devices compared to those compared above. As you can see it is very easy, even in one line of code:

var l;

setInterval(“digitalWrite(LED1,l=!l);”,200);

To stop the blinking, simply type:

clearInterval()

But it can be even easier and more enjoyable. There is built-in functionality in Espruino to handle sending precisely timed waveforms using built-in hardware timers. Even if you don’t need the precision:

digitalPulse(LED1,1,[10,500,10,500,10]);

LED1 will flash on (1) for 0.01s, off for 0.5s, on for 0.01s, off for 0.5s and finally on for 0.01s.

Conclusions:

This tool, which will allow us to know and get into this beautiful field dedicated to microcontrollers. Recommended especially to beginners thanks to its sensitivity and ease of use, but still manages to perform large and complex projects with it.

Let us know in the comments what you think of this other way of programming microprocessors. You can find us on Twitter or LinkedIn to talk and share on the topic. We invite you to join our Canal de Telegram, where we publish great content of value that will be of great help to you.

If you are taking your first steps in this immense world of electronics and low-level programming, in our Youtube Chanel you will find the course: Arduino for Beginners which you will love.

 

Leave a Reply