After having the Linkit Smart 7688 Duo in my hands for a few days, I became very familiar with its inner workings. It runs a MIPS processor and hosts a version of OpenWRT linux, a very capable distribution that has been designed for devices with very limited resources. I have used OpenWRT in several Linksys wireless access points and it is very reliable. It isn’t the easiest thing to get working, but once you get into the rhythm, it works every time.
Seeed has made the Linkit 7688 easy to use due to a nice boot loader and several interfaces that make things easy. I was very interested in the Duo since it has the best of both worlds — a real Linux system and an ATMega microcontroller that are linked together internally. One thing that made me unsure of the Raspberry Pi was the difficulty in doing any real-time control of devices. Linux can pre-empt you at any time to do its own housekeeping, so if you are twiddling bits on a gpio pin, you may get into trouble. The ATMega, on the other hand, can be tuned to do exactly what you need to do, down to the microsecond.
Although I’m fairly fluent in several computer languages, my favorite lately is Python. It was a welcome surprise to find that python was already installed on the Linkit. One of the major problems with the Arduino is trying to fit the network code, a protocol, and user code into that tiny flash. It usually worked, but I discovered that there were many projects that would need more than one Arduino just to house the functions that talked to the sensors and actuators that were required.
With the Duo, you can dedicate the Arduino to the working code and have a very frugal serial connection to Linux. This lets you put all the heavy network code into Python and let the Arduino work in the background. This also lets you use a very secure protocol for communication to the home automation server. That was almost impossible with the Arduino.
Of course, you are still going to have to code the Arduino in C, but with the network code out of the way, it becomes almost trivial. Most of the code examples work right out of the box and all you have to do is write some messaging functions to talk to Linux. ( There are several ways of doing that, too, but I like to use just a simple UART protocol.)
In general, the Linkit seems to be very fast. The program startup can take a while, because the flash “file system” is using SPI. A python cli prompt can take several seconds, but for things that don’t need file access, it is plenty fast.
Uploading the Arduino code is a breeze too, since the Linkit has a real network connection, the Arduino IDE can send the code over the wifi, no USB needed. This means that real remote uploading is a reality. Even if your controller is stuffed in a box in the garage, you can still send the ATMega a new set of instructions from your desk. And, of course, the Linux system is business-as-usual by using SCP or any other method.
Disasters and Recovery
Like any of the small “computer on a chip” systems, the Linkit can become broken due to power, programmer error, or other damage. Fortunately, you can restore the board to factory-fresh condition with just the buttons on the board. Indeed, there are a couple of ways. If you need just the Wifi restored to AP mode, one button does that. And if you want to wipe all traces of your meddling, another button press takes care of that.
So follow the advice of all experienced hackers and backup your data. It only takes a few minutes to fix the board and with recent backups, you can have it back in business in no time.