Digital artist Seb Lee-Delisle (opens in new tab) will deliver the opening keynote at Generate London (opens in new tab) on 21 September. The two-day conference will also feature Anton & Irene, Zell Liew, Jaime Levy, Steve Fisher and many more excellent speakers. Get your ticket today (opens in new tab)!
Over the last few years, the maker community has grown exponentially. As such, it's a really great time to start experimenting with electronics. The more our shiny gadgets are locked down and proprietary, the more we want to find out what strange magic is happening inside.
As a direct response, the open-source hardware community has grown, and new prototyping platforms are constantly emerging. It's never been cheaper or easier to get hardware for your own hacking projects.
My journey with electronics started when I was a kid. My dad would often bring home electronic components from work for me to play with. I learned about breadboards, making simple circuits and soldering. I still love bright, confectionary-coloured LEDs. Fast-forward to a few years ago, when I was told that you could use an Arduino to attach large knobs and buttons to your games and projects.
So I bought one. And it dawned on me that this wasn't merely a hardware interface for my computer, it was an independent device that could process logic and run code by itself. In effect, it was a tiny self-contained computer. I got hold of an 8x8 LED matrix, made a simple particle system, and I was hooked. Over the last few years, I have been integrating hardware into my digital art projects more and more. These electronic devices let you get out of the computer and into the real world.
If you want to get into hardware projects, you're probably a little daunted by all your options. Two of the biggest platforms in this arena are the Arduino and Raspberry Pi. Each has different strengths and capabilities.
The Arduino is a prototyping circuit board comprising a central chip and several GPIO (General Purpose Input/Output) pins that you can connect stuff to. You can program each GPIO to be either an input (to read data) or an output (to control things like lights and motors).
But don't just buy an Arduino – it's much better to buy some kind of starter kit. Look for one with a variety of components, jumper wires and a breadboard, along with a good guide book with exercises to get you started.
There are many kits available, including one made by Arduino (opens in new tab). My personal favourite is the Sparkfun Inventor's Kit (opens in new tab), which comes with a nice case to keep your projects in while you're working on them. It has a great manual with clear diagrams and 16 example projects to get you started.
There is an incredible variety of Arduino code libraries, resources and add-ons available, including 'shields' that sit on top of the board and give you extra powers, like driving motors, controlling LED screens, playing music or sending out MIDI information. Here are a few of the many Arduino-compatible boards that I particularly like:
- Adafruit's Trinket (opens in new tab) – This is tiny and cheap, with five GPIO pins. If you need more pins and memory, try the Trinket Pro or the Arduino Nano.
- Teensy 3.1 (opens in new tab) – The Teensy 3.1 is very fast and powerful, and still very small. It uses 3.3V instead of the standard 5V, so sometimes you need to convert voltages to work with some components. These are the brains of my Laser Light Synths (opens in new tab), and they're very good at controlling thousands of addressable LEDs.
- Arduino Mega (opens in new tab) – This is much bulkier than the Trinket and Teensy (although that's not saying much). But if you need a lot of pins and memory, the Arduino Mega is for you. It has the added benefit of being a genuine Arduino, so you know your money is going to support the people that created the project in the first place. What's more, it's compatible with most Arduino shields.
Build your own Arduino
The incredible benefit of open-source hardware is that you can easily move from a one-off experiment to something you can bring to production. You can take the circuit layout of the Arduino, add your own components and manufacture your own products. This may not seem important when you're first starting out, but if you get the bug, you'll be designing and manufacturing your own printed circuit boards (PCBs) before you know it.
Programming the Arduino
The Raspberry Pi (opens in new tab) is a cheap Linux computer that also has a bank of GPIO pins, making it a great platform for electronic prototyping. It's only been around for a few short years, yet already it has revolutionised low-cost computing.
A strong and vibrant community of makers has grown and there is a vast range of cases, peripherals and learning resources available. The brand new Pi 2 is faster and has more memory than the previous models, with backwards compatibility and the same form factor as the previous B+ model.
Unlike Arduino, the Raspberry Pi can easily drive HDMI screens and play large audio files. If you're already familiar with Linux and Python or Node, it'll be very easy for you to get started. You don't even need to attach a keyboard or screen to the Pi, you can ssh in from your computer to program it. And of course the whole thing is connected to the internet via the ethernet port or a Wi-Fi USB adaptor.
Just like the Arduino has 'shields', the Pi has 'hats' that sit on top of it and provide special extra powers. My favourite is Pimoroni's Unicorn hat (opens in new tab) – an array of super-bright LEDs that sit on top of the Pi. In fact, Pimoroni is an amazing UK success story with a wonderful stock of Pi cases and components.
ST4I (formerly IoT)
You can't have missed the hype about IoT, or the 'Internet of Things'. It's so ridiculous that I hate even using the term. The fact that corporations like Microsoft have a 'Director of the Internet of Things' makes me throw up in my mouth a little. I prefer using my own term: Stuff that Talks to the Internet, (STTTTi or ST4I for short). It's equally ridiculous, but at least it's my ridiculous.
I'll let you into a little secret about the IoT: no one has really figured out what it's for. Sure we can control our thermostats and the colour of our lamp with our mobile phone, but we're still flailing our arms around in the dark trying to get a grip on how exactly it's going to work. We all know it's going to be big, we're just not quite sure what its killer app will be.
But here's the thing about technologies on the verge of finding their use: they're really fun to play with. Like really fun. It's the perfect time to be imaginative, creative and just play with this stuff. That's why I put together my ST4I workshop – it's two days of experimenting and learning, and it comes with a kit full of stuff including a Wi-Fi enabled Arduino. Check out st4i.com (opens in new tab) if to find out more.
How to turn an Arduino into an ST4i device
A Raspberry Pi is already networked, but an Arduino needs extra hardware (and code) in order to connect. I like the Adafruit CC3000 Wi-Fi shield – it sits on top of your Arduino and connects to your Wi-Fi, and there are lots of code examples to help you read data from the internet.
Arduinos with built-in internet
There are Arduino-compatible boards that are already internet-capable. My favourite is the Linkit One, which has a Wi-Fi chip built in. But that's not all. It also has Bluetooth and GSM. Stick a SIM card in and it'll get mobile data straight off that. If that wasn't enough, it comes with GPS, and an audio interface. You could make your own low-tech smartphone with this board. I really have no idea why you would do that, but for some reason the idea excites me.
The server side
Connecting to a public API is relatively easy, and if you just want to set up a data logging device you can use services like Xively and data.sparkfun.com (opens in new tab). If you want your Arduino device to respond to things on the internet, the easiest way is to poll a data API at regular intervals (say every one to five minutes).
But if you want it to respond instantly to something, you can set up a permanent socket connection to the server. This is a bit trickier, but I've been working on Node.js code to do this. It's all open source so you can keep an eye on my GitHub (opens in new tab) to see how it matures.
With GSM mobile data modules dramatically dropping in price, it will only be a couple of years until everything has its own internet connection. The concept of adding Wi-Fi to a gadget will seem really old fashioned.
I've long delighted in attaching lights, buttons and tactile interfaces to my projects, and with the growth of the hackerspace network and maker community, there are so many opportunities to learn how to make stuff. It's time to take the work we've been doing inside the computer out into the real world.
This article originally appeared in issue 266 (May 2015) of net magazine (opens in new tab).
Generate London (opens in new tab) will be preceded by a day of workshops, covering UX strategy, running design and content sprints, and building scalable responsive component. They'll also look at how to quickly come up with a concept and solution to a client brief, and create a convincing presentation that sells your idea either to your internal team or client within just a couple of hours.
If you buy a combined workshop and conference pass (opens in new tab), you will save £95!
Liked this? Read these!