Tuesday, March 29, 2016

Develop with NodeJS for Intel Edison


Introduction.

I’m going to start a new set of my Blog’s entries, where we will discuss how to leverage all the features coming from NodeJS platform to develop applications on an embedded system. We will use the board produced by Intel: Intel Edison.

In more modern term, we’re discussing how to develop an Internet Of Things’ (IoT)  Application using NodeJS and Intel Edison.

First of all, some brief information about Intel Edison Board.

Intel Edison.

(mostly, this information is taken from the Wikipedia entry and from Intel’s site.)

Intel Edison is a computer-on-module produced by Intel as a development board for IoT.
The module is very small (35.5 x 25 x 3.9 mm).
The main SoC is an Intel Atom “Tangier”, with two cores 500 Mhz and one Intel Quark core 100 Mhz (for executing, for example RTOS Viper). The SoC has 1 GB RAM. There is also 4 GB of eMMC flash.

 

Other features:
·       Integrated WI-FI
·       Bluetooth BLE
·       USB
It runs YOCTO Linux and has development support for the following languages:
·       C/C++
·       NodeJS
·       Python
Intel provides support for different IDE:
·       Arduino IDE
·       Eclipse (C/C++)
·       Intel XDK (NodeJS)

Development Boards.

Edison is a very small module and for makers it is not easy to interface with it.

To simplify the development of IoT devices several boards, from different manufacturer, has been developed.
Intel has developed a Board that is totally compatible with Arduino Uno R3 (Intel Edison Kit for Arduino Board).

(the Edison module is not yet installed, the place for it is on the bottom-left).

The features of the board are:
·       20 digital input/output pins, with 4 pins as PWM outputs
·       6 analog inputs
·       1 UART (Rx/Tx)
·       1 I2C
·       1 ICSP 6-pin header (SPI)
·       Micro USB device connector OR (via mechanical switch) dedicated standard size USB host Type-A connector
·       Micro USB device (connected to UART)
·       SD card connector
·       DC power jack (7 to 15VDC input).

The Hardware Guide for this board can be downloaded at the following address:


This board, for example, enables you to use any shield that has been developed for Arduino Uno.
One good example is Seed Studio Grove Base Shield.

The software.

Intel Edison runs a Linux distribution, provided by Intel: YOCTO. You install the latest available version when you “flash” the board, following the instructions provided by the Intel site (in the rest, we will assume that the board has already been flashed).

On the board you will find a set of software components already installed and running:
·       NodeJS, vers. 0.10;
·       The XDK agent, that enables the connection between the XDK IDE, running on your laptop and the board;
·       Mosquitto MQTT broker (interesting)
·       Two libraries, provided by Intel, to interface the HW: MRAA and UPM
·       The equivalents module for Node

The Node environment is already set-up and perfectly working, even if the version provided (0.10) is not optimal. You can start working with it to learn. To begin it is OK; It is not  if you want to run more serious application. In another entry I’ll discuss how to upgrade the NodeJS environment and why I needed to upgrade.

Next.

In the next Blog’s entry I’ll discuss some important things about initial configuration, and the we will go straight to the SW development.

No comments:

Post a Comment