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.

Saturday, March 26, 2016

Intel Edison e Node.js

Node.js is one of the most interesting development and runtime environment that you can see around, today.

One of the really interesting thing is that you can use JavaScript, in Node environment, to develop a full system made by several layer.
Exactly the same environment and language in different layers.

And, what is more interesting in the IoT space, is that Node.js is well supported in embedded device.

For example, there is a very good support in the Intel Edison Board.

so, just for example, you can develop a Node application that runs on the Edison, reads values from connected sensors, sends the redings as MQTT messages and a Node Application on a IoT Gateway (for example based on RPI) read this values and does whatever you need.

Cool!

Thursday, March 3, 2016

Raspberry PI 3

World is going faster and faster.

I'm using today, as IoT gateway for my prototype of an IoT systems, a RPI2 with an added WIFI dongle, and it runs perfectly. Up and running since months without losing a beat.

But now, at the same price, you can get an RPI 3

https://www.raspberrypi.org/blog/raspberry-pi-3-on-sale

64 bit CHIP, more power and WIFI on board.

IoT is really behind the corner. We need only to figure out the Applications and Build the code.

Monday, February 22, 2016

Another MOOC

IoT is becoming more and more important for learners.

There is an interesting new MOOC for the King's College of London

https://www.futurelearn.com/courses/internet-of-things

It is not for developers, high level, but contains many interesting ideas.

For example: what are the problems that we're facing today for connectivity?
Is is Zigbee the right answer, or do we need new technologies for connecting things.

I'll return back in a few days.