Intel Edison
After the Galileo and Galileo Gen. 2, the Edison is the 3rd board from Intel targeted at the hobbyists and makers. Now branded under the IoT umbrella, the Intel Edison include solid features.
The Edison comes as a kit: the Edison module has a proprietary connector to be plugged into a guest board. Choice is aplenty, with two solutions from Intel, including an Arduino compatible expansion board and a compact breakout board, and many more from third-party manufacturers. I've tested the Edison with the two Intel boards, and a Grove shield on top of the Arduino compatible expansion board. |
Hardware
The surprise comes from the chip the Edison is built around. It is actually a SoC or system on a chip, and includes two processing units, a micro-computer (MPU) and a micro-controller (MCU).
This is the standard configuration for advanced applications. The MPU deals with power-demanding tasks like communication, storage and display, while the MCU manages time-constrained deterministic-executed tasks like GPIO and motor control. Installation and first steps are very well documented with clear instructions and pictures. However, general documentation is not always exhaustive. For example, some jumpers on the Arduino breakout-board are not mentioned. I had to dig into the schematics to find the information. Similarly, the website suffers from too many redirections to find twice the same document. |
The Edison Soc with MPU + MCU, WiFi + BLE
|
Software
By default, the Edison comes with the Yocto Linux, but other options are available.
For example, Windows is heavily promoting Windows 10 for the Edison. Is the Intel Edison with Windows 10 the modern variant of the Wintel legacy, those PC compatible based on an Intel processor and running on Windows? |
The breakout board populated with 56 pins and a power plug
|
Development Software
Three kinds of applications can run on the Edison, and each comes with its tools: Wiring / Arduino framework-based sketches, native applications for Linux Yocto, and applications for the MCU.
A specific version of the Arduino IDE —or a plug-in for it-- brings the standard Processing-based IDE to develop sketches based on the Wiring / Arduino framework. Intel provides a complete SDK for Yocto, including the tool-chain and the libraries, with Eclipse as recommended IDE. The MCU SDK and API for the micro-controller includes a specific version of Eclipse. All the tools are available for the three main operating systems, Windows, Mac OS X and Linux. I faced no difficulties in installing the three tools on Mac OS X as Intel provides all the tools as binaries. Implementing support for those three environments on embedXcode as the tool-chains are based on GCC. |
Back to basics with a blinking LED connected to the Grove shield
|
One Example, Three Environments
I played with the same basic blinky example with a sub-routine on the three environments. Here are the respective codes for, from left to right, Arduino, Yocto and MCU.
All environments require the initial #include of libraries. The pin number differs from one environment to another.
|
#include "Arduino.h" uint8_t myLED; |
#include <signal.h> #include <stdio.h> #include <stdlib.h> #include <stdint.h> #include <unistd.h> #include <errno.h> #include "mraa.h" #define LED_PIN 48 int running = 0; void sig_handler(int signo) { if ( signo == SIGINT ) running = -1; }
|
#include "mcu_api.h" #include "mcu_errno.h" #define myPin 48 |
The blink() sub-routine does exactly the same on the three environments. Both the Wiring and the MCU frameworks provide higher abstraction while the pin is managed as a file on Yocto.
|
void blink(uint8_t pin, uint8_t times, uint16_t ms) { for (uint8_t i=0; i<times; i++) { digitalWrite(pin, HIGH); delay(ms >> 1); digitalWrite(pin, LOW); delay(ms >> 1); } } |
mraa_result_t blink(mraa_gpio_context pin, uint8_t times, uint16_t ms) { mraa_result_t r = MRAA_SUCCESS; uint32_t us = (ms *1000);
for (uint8_t i=0; i<times; i++) { r = mraa_gpio_write(pin, 1); usleep(us >> 2);
r = mraa_gpio_write(pin, 0); usleep(us >> 2); }
return r; }
|
void blink(int pin, int times, int ms) { int delay = ms /10; int i;
for (i=0; i<times; i++) { gpio_write(pin, 1); mcu_sleep(delay /2); gpio_write(pin, 0); mcu_sleep(delay /2); } } |
The main() routine is hidden for the Wiring framework: it simply calls setup() once and runs loop() endlessly.
|
void setup() { myLED = 7; pinMode(myLED, OUTPUT); } void loop() { blink(myLED, 3, 333); delay(1000); } |
int main() { mraa_result_t r = MRAA_SUCCESS; mraa_init();
mraa_gpio_context gpio; gpio = mraa_gpio_init(LED_PIN); if ( gpio == NULL ) exit(1);
r = mraa_gpio_dir(gpio, MRAA_GPIO_OUT);
signal(SIGINT, sig_handler);
mraa_gpio_write(gpio, 0);
while ( running == 0 ) { r = blink(gpio, 1, 333); sleep(1); } r = mraa_gpio_close(gpio);
return r; } |
void mcu_main() { gpio_setup(myPin, 1);
while (1) { blink(myPin, 3, 333); mcu_sleep(100); } } |
I don't like the implementation of the Wiring / Arduino environment on the MPU. Too many resources are wasted. It should target the MCU instead.
Development of native Yocto applications seems the most mature and promising environment. The MCU SDK and API are still a work in progress. Some features aren't available yet and MCU management requires the reboot of the whole board. Similarly, the MCU OS tick value is 10 ms. embedXcode+ supports the Edison board on the three environments. |
Conclusion
The major surprise with Edison comes from the full eco-system available. The choice among development languages and tools, boards and peripherals, is large and leverages the powerful SoC.
The board is promoted as Arduino Certified but using the Wiring / Arduino framework on such powerful a board is just a waste of resources. My recommendation is to go directly with native applications and explore the magic of MPU and MCU working together. The MCU SDK hasn't been updated for a while. The know limitations make the MCU difficult for a real case. Is the project dead? Yes, it is. Last June 16, 2017, Intel announced it ends support for the Edison board at December 16, 2017. |
From left to right: serial terminal USB port, power and Ethernet through USB port, device-host mode switch, standard USB port, power
|
Pros
|
Cons
|
Wrap-Up
|
Links
Posted:
Updated: March 17, 2017; July 4th, 2017