Arduino Yún – Seeeduino Cloud vs. Adafruit IO

Introduction

As you may know, I own an Arduino Yún board. When I bought it several years ago, it came with the OpenWRT Yún image pre-installed. This is an OpenWRT Linux fork running on the Atheros SOC, leaving the ATmega 32u4 for you to program. The Bridge library is used to connect the two, using the Serial1 on-board connection between them.

More recent (after 2015) Arduino Yún boards seems to ship with a different image, the Linino. This latter approach seems to be different compared to the original OpenWRT’s, in some fundamental way. In Linino they seem to be using the firmata firmware on the AVR side, and they offer you to program the board using the Linux side exclusively by using Node.JS or something else capable of talking to the AVR side using the firmata protocol.

Because the original setup is more versatile to my use, I decided not to upgrade to Linino.

Using Adafruit IO

Anyways. I wanted to use the Cloud service of Adafruit Industries, with my Arduino Yún board. Unfortunately it turned out, that this particular board is not supported.

I was a bit disappointed, but it didn’t stop me. I decided to fork their repository, and implement the missing support myself.

Unfortunately there is a name clash between the class names in the ArduinoHttpClient- and the Bridge library. They both use the class name HttpClient. I had to came up with a solution, because the former is a dependency in the Adafruit IO and the latter comes with the Yún. I solved it by implementing another HTTP client library for the Yún and by using preprocessor directives to include sources conditionally.

The BridgeHttpClient library offers generic HTTP client functions.

The forked Adafruit IO library is now usable with the Adafruit IO cloud service, however there are limitations. The SRAM in the ATmega 32u4 is small and your application might not fit into. The other limitation is regarding the insecure MQTT connection. Unfortunately the last official Yún image ships with a Bridge version (Bridge version 101) which does not permit SSL connections. However the Bridge version 161 is available on GitHub, but has not been released yet. So use it on your own risk!

The typical examples included in the library have been successfully tested and were working for me.

Arduino Yún – Seeeduino Cloud vs. Adafruit IO

Leave a comment