My name is David Bos, a 3rd year electronics-ict student from PXL college Diepenbeek. I did my internship at Appsaloon, they develop web apps and maintain websites. They also organise technology events such as the Arduino Jam and the Zumo Robot Wars Hackathon.

Besides their main activities, they are also in the middle of developing a time-management system, the TimeKube. Because the TimeKube interacts with the user through light signals, the idea came up to give the user the opportunity to choose the color and sequence of the light. Thereafter, I started an experimental domoticasystem with an arduino Yùn. It is experimental because we are trying to control an embedded system with JavaScript (Nuts :-)). To be more specific, I used Node.js as programming language.
The light-module
I decided to use the Sparkcore as the brain of the light-system. Why the SparkCore? Well it has a micro-controller and a WiFi-module. Most importantly, it has a Spark Cloud, so I do not need to program the connection with the internet. You can also program the Spark Core through WiFi and via USB. Check this tutorial on how to program via USB. Before finding this tutorial, I tried many different methods, and these methods gave me more insight in Netbeans and embedded systems.

Flowchart
Since I didn't want to waste a lot of IO-pins to drive the RGB LEDs, I used a TLC5940 LED driver. I used the datasheet to program the Spark Core to initialise the LED driver and to control the LEDs.
After programming the Spark Core I started designing the PCB. The first revision was made with DesignSpark PCB. Because I made a little mistake in the first revision, I needed to make a second one. This time I used Eagle.
How to solder the components?
We decided to use a pizza-oven in combination with a PID-controller to solder the components on the PCB-board. The oven is a Proline Cooky and the PID-controller is an Arduino-shield from RocketScream. Why a pizza-oven? Well when we are not soldering stuff, we could warm up a pizza if we want to :-). Read here about building the oven.

When the program was finished and the PCB design was ready I got the opportunity to learn how I could draw and make a case for the product with DesignSpark Mechanical.
The domoticasystem with an Arduino Yùn
For the first setup of this system I would like to refer you to the Appsaloon Blog. After the node server was ready, I started with learning Node.js and writing the code to implement the BMP180 sensor. So I could readout the data. It was a very nice experience swimming in the sea of JavaScript. The following figure shows the general working of the system.

Because the Yùn has a linux distro, OpenWRT-Yùn, I had to dive into studying Linux. Working from a command-line was a lot of fun to do. I had to solve many little problems, but this is something I like to do.
To log the data I used an online data-logging platform, Plotly. Very nice design I say so myself.
I learned a lot during my internship and had lots of fun. I would like to thank Toon for teaching me Node.js and also the rest of the Appsaloon team for the pleasant working atmosphere. Being the moustache of the week was an honor 🙂 .
