Chapter 3. Espruino
Espruino is a “mini Node.js” for microcontrollers. It eliminates the need for a translation layer like Firmata with Arduino.
The Espruino project by Gordon Williams was funded via a Kickstarter campaign in 2014 and has been continuously improved since. To run JavaScript code on Espruino, you don’t need to install an IDE or specific device drivers. You can use the Espruino Web IDE or use a simple serial terminal to program a device.
Similar to Arduino, Espruino has both hardware and software components. Espruino boards have a strong microcontroller core (a 32-bit ARM Cortex processor), and are faster and provide more memory (64–96 KB RAM and 256–512 KB flash) than an Arduino Uno. The better MCU is needed in order to parse JavaScript and libraries.
Espruino is completely open source. A variety of ports of the Espruino runtime have been made to other boards and processors. For example, boards with an ESP8266 are now supported. Although boards with an ESP8266 are popular due to cost and performance considerations, in order to support further development of the Espruino project, it is a good idea to buy the Espruino directly from the Espruino website.
The Espruino Hardware
On the hardware side, there are two main flavors: the original Espruino board (Figure 3-1) and the Espruino Pico (Figure 3-2). To quickly get started, the Espruino Pico (around $30) is a good option. As you can see in Figure 3-1, there are several digital and analog pins. Compared to Arduino, ...
Get Node.js for Embedded Systems now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.