This article will compare my experience with the Arduino Yun which I have been using for several months and the Intel Edison which I have been playing with only a few weeks.
I originally intended to write this article merely to offer a first look at the Intel Edison and not to compare it to my current favorite MCU, the Arduino YUN, but I could not help but compare them while I was learning the Edison. So I decided to take that angle. I originally got the Edison for Christmas and only got around to playing with it in the last few weeks.
Edison first look
Before we start talking about the Edison I think it would make sense to compare the Edison with its predecessor, the Galileo. The comparison is pretty simple: the Edison is way more powerful and I believe it has one leg in the maker-space and the other in production IOT devices. Here is a quick comparison of the specs (shamelessly stolen from stackoverflow.
- CPU: Intel Quark X1000 400 MHz
- RAM: 256 MB
- Storage: Micro SD Card
- CPU: A dual core, dual threaded Intel ATOM x86 CPU running at 500 MHz and a 32-bit Intel Quark Microcontroller running at 100 MHz.
- RAM: 1 GB
- Storage: 4 GB ROM + (micro SD card on Arduino board)
- Communication: WiFi and Bluetooth LE.
As you can tell, the Edison gives you many more options. Granted, it is the size of two postage stamps. I purchased mine with the Arduino breakout board which is basically the Edison snapped into a board that includes an Arduino Uno. My comparison will be exclusive to this breakout board and not the stand-alone Edison. I really liked the Edison at first, then I hated it, then I liked it again and finally I ended up feeling it was pretty impressive, with a few "gotchas" which I will try to cover.
I unboxed the Edison and Googled "Intel Edison getting started" and of course I ended up on Intel and followed the instructions on setting up which were pretty easy. The Edison has two micro-USB ports, one of which is used for terminal connection and the other for power and for your sketches. There is even a switch where you can put one of the USB ports in host mode (to host mice, keyboards, etc.)
Next, you need to load the OS. I actually don't remember all the steps, but I do remember the documentation was very clear and relatively simple to follow.
So I was up and going and followed the instructions to upload the blinky sketch to the Arduino side and again I was pleasantly surprised: no difficulty. But here is where the disappointment started. I thought a real test would be to see if I could get it to talk to another Arduino via i2c. This is a pretty basic and fundamental feature of Arduinos and the master slave i2c is a great exercise. I set up an old Duemilanove as the master and tried to make my Edison the slave per the tutorial above, but I could not see anything on the Edison console. Luckily I got my second Yun this very day so I pushed the slave sketch to the second Yun and it worked, no problem.
Here is where the disappointment gravitated to its highest level. I found myself getting sucked into the endless sea of Intel documentation that all big, old companies have. I became lost in forums and could not figure out how to retrace my steps to find a previous post. The Intel forums seem disjointed and hard to navigate. I eventually saw some stuff that made me feel this might not work. I saw several posts where people were saying that some sketches would not run for the Edison Arduino breakout board. This should come as no surprise since you have to download an Intel-specific build of the Arduino IDE.
I also saw some posts that said the Edison had two i2c busses and you had to specify which buss you intended to use via a jumper that I could not find on the board. I think the purpose of these two busses is that one is for the native Arduino and the other is for the breakout.
Another problem I had was trying to find specific posts related to the Edison with the Arduino breakout board. I also saw a post that suggested I set some GPIO options to get the i2c buss working the way I wanted, which did not work. At this point I was ready to give up on the Edison.
It is not all bad
At this point I was ready to give up on the Edison; however, in my searches I found a ton of Instructables and I am a big fan of Instructables. From what I surmised, it looks like Intel poured some marketing dollars into getting makers to experiment with the Edison. And I am totally o.k. with a company buying adoption. Most of them are in the vein of getting started but there are some great ones there too.
I also remembered buying an eBook on the Edison, and looking at it again renewed my faith in the product. The book The Hands-on Intel Edison Manual Lab by Agus Kurniawan did a great job of showing you how to do things three different ways: (1) By uploading a sketch; (2) by accessing the GPIO ports directly with Python; (3) by accessing the GPIO ports directly with NodeJS. I tried some of the examples in Node and I was sold.
This led me to one distinct advantage of the Edison over the Yun: that I could write logic in a sketch to control the pins in a traditional Arduino way, and I could also write logic to control the pins from inside Linux.
The one great advantage of the Edison over the Yun
When using the Yun, you create a sketch which loads the bridge library which in turn loads a bridge.py Python script that allows you to access the pins from inside Linux via REST calls. The Edison works the same way with an mraa library that is always running. The Arduino pins of the Edison are mapped to the GPIO pins of the Linux processor. This means from the Linux side of the Edison you can access/control the pins regardless of what sketch is running. This might not seem like a big deal, but let me illustrate an example.
On the Yun I can load the bridge example which will allow me to access the pins via a REST call from inside the Arduino or anywhere else on my network. This is great but now I want to add a temperature sensor and an LCD. On the Yun I would need to add my LCD code and i2c code to the same sketch that is also setting up the Yun Client/Server to handle the REST calls. In essence I am merging two independent sketches, which can get cumbersome. On the Edison I can access the pins for free, leaving me to write a sketch that merely focuses on the temp sensor and LCD. Of course I don't get the nice REST interface and I would have to write that from scratch on the Linux side, and create my api server.
The other advantage I see is that the Edison has built-in BLE (Bluetooth Low Energy) support that is missing on the Yun. To counter this, the Yun has a great version of openWRT so you can manage your Linux distribution with a powerful LuCI web interface. The Edison is built on Yocto which is a terse modular distribution targeted at embedded devices.
Why I like the Yun better
One of the things I really like about the Yun is that it starts in AP (Access Point) mode. This means that when you supply power to it you will see a wireless network called ARDUINO- [plus the Mac address] and you can join the WiFi network and navigate to
http://arduino.local and get right into your Yun. You can even load sketches this way and never have to physically connect your Yun to a host. But that is not the reason I like it better. I know how to use Arduinos and I know how to use Linux. The Yun is simply a Arduino Leonardo that also contains an awesome Linux distribution. They both have some tools that allow these two processors to talk to each other but they are uniquely different, and you have to hairpin out of one to talk to the other. Separate but equal! This is the reason I like the Yun better.
Although I was more impressed with the Edison Arduino breakout than I expected, I found it was a whole new beast I had to learn. I also discovered that I can't assume that any old sketch I had would also work on the Edison. I think that the Edison lives up to everything the Intel says it is, which is great but for now I am going to stick to the Yun as my IOT-generation Microcontroller of choice. For further reading, check out my hands-on series IOT Soup to Nuts.