Why i chose Raspberry instead of Arduino Yun and Spark-Core in the end

Yesterday i published my latest project „Opacity“ on this blog. It’s a more art-related project because it is a submission to the transmediale conference/exhibition in Berlin in January 2015.

What i wanted to achieve in this project technically is a distributed network of sensors that send all kinds of data to a central unit for processing. My first ambition was to use Raspberry for the central processing because it has a camera and a much more flexible system for doing complex and multiple tasks like running a web/app-server, manipulating images, creating sound etc. – and more Arduino-based clients for the objects with sensors. But these should communicate with the central unit over http-commands. Therefore the Arduino Yun came to my mind (and i had one laying around) and also the spark-core which i used for some smaller tests before already.

I started with the Spark and had to solve a couple of complex issues first before i could use it as a http-client – to my surprise this functionality was not built into the firmware as the device seemed to be designed for acting as a http-server more and of course for interaction with it’s own cloud. But this worked out in the end, i could send http-commands to the central unit. I could also read data from a light-sensor over the analog pins, although everything was a little bit more difficult, slower and not so straight as working with the Arduino IDE and an Uno for example. The main reason for this is the proprietary, web-based IDE that the spark is using. It’s much harder to access the serial-port for instance – so i installed the command-line tools for the spark which required the installation of a couple of other complicated things. Still hard to see any output from the serial port. Did a firmware upgrade. Every time i uploaded a new software and tested it i had to watch the device flashing and blinking in different colours and frequencies – partly a designed behavior but partly also because it was losing the connection, rebooting again etc. – it felt like ages until i could see whether the changes had an effect. And it was losing the Wifi connection so often, again hard to debug and even harder to fix. It made me tired, after trying to make it work with the i2c bus everything got so weird and buggy that i decided to give up on it. And changed to the Yun.

The Yun is a beautiful device and follows a similar principle as the Spark – but it is coming from the Arduino guys and works with the IDE like any other Arduino. You can access it either through the USB or through the Wifi-Connection. It has http-libraries and excellent examples and documentation (and awesome support by API-aggregator Temboo). So i was delighted how easy things worked suddenly, i had my tracker up and running within minutes.

But then came the problems – because the Yun also works with a weird way to connect it to the Wifi. It creates it’s own Wifi where you have to login with your PC. Then you configure it for the Wifi it should work with and reboot. After that it should log in to your Wifi and do what it is supposed to do. Which it didn’t do – well, sometimes. Sometimes not. Really hard to figure out what made it so hard for him to connect to the web wirelessly. After reading and trying and resetting and trying again i also gave up on this device.

The advantage of the Raspberry in these cases (i would say when networking is required) are really big. You can log into it via ssh. It’s a normal Linux server and you can install packages, use the web-server you feel comfortable with, check the logfiles if anything goes wrong, use standard equipment like USB-Wifi devices and you will find tons of support on the net because in fact you are working on a Debian-Distribution like any other server somewhere else. If everything goes wrong you connect a keyboard and a HDMI screen and see what’s going on. It’s reliable. Of course it has it’s limit in reading analog sensors for instance. In my case i got around this by using i2c and a trick for the light-sensor (first time i used a capacitor, yeah!).

I don’t want to be unfair – Arduino-Devices with built in Wifi are around only a few months basically and the Spark just got out of kickstarter. That’s all fine, they will improve and i am waiting for this because sometimes it would just make more sense to work with an Arduino. But for the moment i would recommend the RPi if you are thinking of a project that requires wifi and http.

About holadiho

This entry was posted in Arduino, Raspberry Pi and tagged , . Bookmark the permalink.

1 Response to Why i chose Raspberry instead of Arduino Yun and Spark-Core in the end

  1. Pingback: Opacity | Making connected stuff

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s