Using an Arduino Yun, Temboo and Parse to make a temperature logger


I recently got my hands on one of the latest breed of Arduino boards - the Yún, so I decided to knock together a quick hack to log the temperature and display it using a webapp.

The Yún takes web connected projects to a whole new level due to the fact that it has onboard ethernet and wifi accessible via a dedicated Linux chip, providing more power to better handle data connections. The Yún is similar to an Arduino Leonardo which based on the ATmega32u4 processor with the addition of a separate chip running Linino (which is based on OpenWRT). The two chips communicate via an Arduino library called Bridge, which allows you to write familiar Arduino sketches, and also easily harness all of the extra power from the Linino chip. This makes consuming the web easier, and paves the way for a whole host of IoT applications.

The other great thing about the Yún is the integration with Temboo.

Temboo is a scalable, fault-tolerant environment for running and managing smart code snippets that we call Choreos. Choreos can call APIs, simplify the OAuth process, send email messages, perform encoding, update databases, and lots more.

The Yún includes two parts that make it easy to connect with hundreds of APIs from any sketch.


The first part is a small library called Temboo.cpp that comes bundled with the Arduino IDE. When this is included in sketches, it provides a unified way of connected to the APIs. The other part is a Python client that is bundled with the Linino base image that forwards request over HTTPS to the Temboo cloud service.

One of the hundreds of API integrations that Temboo have is with Parse.

Parse allows your team to focus more on creating a great user experience and forget server maintenance and complex infrastructure. Instantly add push notifications, data storage, social integration, and more the moment you integrate a Parse SDK into your app.

To read the temperature I used a DHT11 sensor. This was mounted on a shield, along with a WS2812 RGB LED to provide feedback. It flashes blue when data is being sent to Temboo. If the API call was successful, the led blinks green or red if an error was encountered.

Photo 08-10-2013 21 08 09_600

Using Parse Data and the Create Object Choreo, it’s really easy to save data to Parse. I simply read the values from the DHT11 sensor and wrote those to Parse each hour. To get the data back out was a matter of using the Parse JS SDK and throwing together a few queries.

Screenshot 2013-10-08 21.51.38

A sprinkle of Helvetica and iOS7 inspired design allowed me to create a simple web page to view and present the data. Sparklines was used to provide a graph of the last 5 hours of temperature readings.

Photo 06-10-2013 16 14 50

Ubuntu Persistant iptables

By default Ubuntu doesn’t preserve your iptable rules between restarts.

You could create an init script, or you could just run the following command:

sudo apt-get install iptables-persistent

GraphSearch is amazing

Quite simply, the new Graph Search from Facebook is amazing. Not only is it extremely fast, but also highly accurate.

So far, I have been doing basic searches to discover new artists based on the pages that other people like that I also like.

The scope for searching content is endless, and it’s clear to see how this will be a benefit for sponsored results, e.g find Indian restaurants in Birmingham that my friends have been to.

A few enhancements for iOS

Ever since the first iPhone came out I have been in love with the platform, however a few missing features are really starting to annoy me. I’m sure I’m not the first, and won’t be the last to suggest some of these enhancements. They aren’t anything big, just small tweaks which I’m sure will make the experience that much sweeter;

Proper location support in Calendar

Within the Calendar app, I can create an appointment and add a location, however I can’t pick that location from my contacts, nor can I open it up in the Maps application. Another feature would be the ability to then not only see a week view, but a map view of all of the appointments for a given period.

Custom app context sheets

Apple have recently added Twitter support across the entire OS. This is great, but should be extended for any app, with the ability for the user to choose which actions appear in which menu’s (they managed to make the Notifications options pretty easy to manage). This is already half done with the ‘Open In’ dialogue; if I have Pages installed, I will have the option to open a .pages file in that application. This would mean deeper integration for apps such as Instapaper or Buffer across the whole system, and would be a way to get a simple type of plugin architecture for mobile Safari.

Add music controls for the Remote app

I have a couple of Airport Express’s dotted around the house so that I can stream music to different rooms. The Remote app is therefore used quite heavily. This means that each time I want to change a track, I have to open the app. It would be great if the shortcuts from the Lock and app switching panel currently used to control the Music app, could be instead used for the Remote app. This is already the case for other music apps such as and Spotify.

Twitter links open in a native Twitter app

Most Youtube links will open in the native Youtube app, why is this not the case for Twitter now that it has been baked in at a system level? I’m not always logged into the mobile version of Twitter, which makes following and replying to a tweet via Safari rather cumbersome. This new feature should be accompanied by a preference toggle, for users who prefer the web based version.

Deeper mobile Safari integration

Mobile Safari needs to be updated in a few ways; the ability to have plugins, or at least custom context menu items, will mean tighter integration with third party apps. In the same way that the email sheet, slides up, performs the action and then disappears could be replicated for other apps. For example, rather than using a bookmarklet to take me away to another app, this action could be completed inline, resulting in a seamless interaction and allowing me to carry on with what I was doing without the need to switch back and forth between apps.

In addition, third party apps that utilise the Safari sheet, should be able to read and write to my bookmarks. They should also be able to share cookie and session data, so that if I am logged into a site in mobile Safari, the instance of Safari inside the Twitter app should also have me logged in.

Starting Out

This summer marks 4 years since I graduated form Birmingham City University with a bachelors degree in MultiMedia Technology. Since then, I’ve worked for a number of companies including the University that I graduated from. In that time I have completely changed my skillset to adapt to the ever changing market.

This post is aimed towards graduates that are looking to pursue a career as a web developer.

The degree that I undertook offered many routes in terms on career choice; web, radio, TV or print. I chose to go down the web root as I enjoyed the ASP and Flash modules (my final year project was to create a Flash based VLE with an ASP back end – the co-incidently lead on to me working as a Flash based eLearning Developer, within the Universities Knowledge Centre).

In contrast I’m now working as lead developer, specialising in PHP and Actionscript. The point is that this industry is constantly changing and in order to remain relevant you must ensure that you update your skillset accordingly. However, this doesn’t mean that you should constantly switch to whatever the trendy new language may be, but you must have a general knowledge of how it works, and when is best to use it.

Below are some pointers as to the skills that will make you stand out amongst other graduates:


Never underestimate the power of reading and gaining knowledge, even if this isn’t directly in your subject field. Set yourself up with a Google Reader account and add some tech feeds. Also Subscribe to a service such as Instapaper, and collect articles and posts to read at a later date.


Find a local meetup group and connect with other like minded developers. If you are in the Birmingham area, come along to HydraHack. This meetup isn’t specific to a particular language and is a great way to discuss general development topics. This will help to broaden your understanding of other development practices and techniques.


Hook yourself up with a Github account and go and build something that you will use on a regular basis. This pet project ca  be as simple or complex as you like. Try something that will actually help you in your everyday workflow as you’ll be more inclined to add features and maintain it. Social coding will help you to get peer related feedback, plus if you can introduce a new technique or language along the way you’ll help to widen your skill set.


Set yourself up with an account on Stackoverflow or Forrst and participate in some healthy dev discussion. Even if you can’t answer any of the questions straight away, this will help you in understanding how to answer questions. Remember it’s important to understand that a great developer won’t always know all of the answers straight away, but will know how or where to find the answers.


Set yourself up with a blog and start writing about your experiences, knowledge and anything you feel would be good to start a discussion. You may find it tough starting out in terms of subject matter, but over time you’ll find your writing skills will improve. This will help you out when it comes to writing briefs and specs for clients.

In summary, you will never learn everything from a University course or a book, actual hands on experience is vital, and the more you can get the better you will become in your chosen field.