Radix’s Adventures in Tech #3: Tanglebots, assemble!

In our ongoing quest to get under the hood of more technology, Fiona tries her hand at coding, electronics and robotics.

As tech copywriters we’ve pledged to get to grips with more technology in 2016, to give us some hands-on experience (albeit modest) of the kinds of things we write about every day for clients.

Emily and George have already ventured into the worlds of Linux and Python, and I’ve been looking forward to my turn. Luckily, an exciting tech-learning opportunity recently presented itself, in the form of a Tanglebots workshop organised by fellow Jubilee Warehouse tenants FoAM Kernow, in association with Lovebytes, Alex McLean and Ellen Harlizius-Klück.

A chance to design and build an actual robot

What, you might ask, is a tanglebot? As its name implies, it’s a robot that tangles things. The team at FoAM – that’s Dave, Amber and Francesca – are doing ongoing research into the long-standing relationship between weaving and coding, and for British Science Week, they decided to extend their explorations by getting local families involved. The blurb promised:

Join FoAM Kernow in our ongoing investigation into weaving and coding, and help us build “Tanglebots” from recycled e-waste, Raspberry Pi computers and electronics. This event for all ages will form a messy introduction into weaving, robotics and coding.

There was also the promise of intriguing prize categories, including “Most Artistic Tangle”, “Least Untangleable Tangle” and “Most People / Things Incorporated Willingly or Otherwise into Tangle”.

This was enough to fire the enthusiasm of my seven year-old daughter, Eliza, who was desperate to attend. She has form in the worlds of both weaving and coding: she went through a phase of Loom Band madness, she’s taught herself basic Scratch programming on an ancient laptop of mine, and she helped me assemble the Raspberry Pi I got a few years ago. (Like a lot of people, we didn’t really know what to do with it after that, so it’s just been lying around the house gathering dust.)

So we signed up for the session, and assembled on the 20th March for our induction into the world of building mess-making robots.

In the brief intro to the day, we learned that building a robot that can actually weave (essentially an automated loom) is really hard, but that it’s significantly easier to build a robot that can tangle wool, ribbon or other textiles. And so that was our mission for the day.

Without much more ado we were ushered into a group with another family, and presented with a disassembled Raspberry Pi and a set of instructions.

Phase 1: Assembling the Raspberry Pi

The Raspberry Pi is a tiny, basic computer – essentially just a motherboard with a set of sockets for attaching USB devices, power, a micro SD memory card (off which the operating system – usually a version of Linux – runs) and other accessories.

One impressive accessory was a tiny touchscreen monitor. I’d only ever plugged our Pi into our telly, so having this tiny, ultra-thin touchscreen was pretty cool.

But the coolest thing about these Raspberry Pis (or Raspberries Pi) was an accessory called the Explorer HAT Pro, which fitted on top of the Pi via its GPIO pins.

The Explorer HAT Pro is like a baseplate for attaching electronic components to the Pi. We were given two components: a Lego Mindstorms motor that would spin backwards and forwards, and a micro-switch to turn the current to the motor on and off. We attached these to the Explorer HAT Pro by poking their wires into the relevant holes. (It was a bit like wiring a three-pin plug, for anyone whose experience with electronics is as basic as mine!)

Phase 2: Writing the control program with Scratch

Once the components are attached, you can use the Pi to write programs to control them. I guess the programming language you use to do that is up to you, but the Pis we were using had a language called Scratch loaded on to them.

Scratch is a really basic – and quite visual – programming language that’s used mainly for teaching young kids to code. In Scratch you “write” programs by dragging and dropping little lozenges with pre-written instructions into a central area on the screen.

You snap these lozenges together to create a list of instructions, and those instructions form the program, which runs when you click on the green flag. Within the lozenges, you can modify certain variables – so, for example, you can change the amount of time the program spends doing something.

Before very long (thanks to the instructions FoAM had given us), we’d assembled a simple program which, when the switch was pressed, would spin the motor one way and then the other. This was the engine of our tanglebot! Now all we needed to do was to fashion some kind of mechanism that could attach to the motor at one end and tangle wool at the other.

Phase 3: Building the tangling mechanism

As it turned out, this was the difficult bit. The FoAM team had brought all kinds of equipment that we could build a tangling mechanism from, including some animatronic kids’ toys that we were invited to take apart and re-use.

Eliza spent quite some time assessing whether a small, motorised hamster could be repurposed into a tangling machine, an experiment which saw us attach a whorl of alarmingly spiky wires to its tail. Sadly this prototype was an abject failure – or as Thomas Edison might have put it, we’d discovered a way not to make a tanglebot.

But eventually our team settled on Lego, mainly because the motor was Lego and therefore other technical Lego pieces could easily be attached to it. The trouble with Lego, though, is that it’s not very strong if something – like a tangle of wool – is pulling it. The longer we made the tangling prongs, the more likely the tanglebot was to fall apart when it encountered any resistance.

After a lot of experimentation with various configurations – including a complex cog-driven version that was abandoned at the last minute – we settled on a very simple design with three prongs that spun first in one direction, then in the other, following the Scratch program we’d put together.

Into the spinning maw of this beast, small human operators would feed four balls of wool, in the hope that the tanglebot would tangle them either convincingly enough to win the Least Untangleable Tangle prize, or prettily enough to win the Most Artistic Tangle prize.

Et voilà!

Here’s a video of our finished Tanglebot in action, courtesy of @kairotic on Twitter:

Pretty decent, eh? Not as impressive as this one. But enough to win us the prize for Most People / Things Willingly or Otherwise Incorporated into the Tangle, which Eliza was very happy about.

What does it all mean?

So, what did we learn? First of all, it felt great to link up software, hardware, electronics and engineering. Essentially we programmed a computer to drive a machine that we designed and made, and that seemed pretty magical. Like a lot of people my age, I learned to program in BASIC when I was a teenager, but that was only to produce effects on a screen. Actually making a real machine felt really rewarding.

Secondly, it’s given both Eliza and me a new awareness of how certain things work around us. On a recent visit to Sainsbury’s I suddenly realised that, if it came to it, we could *probably* write a program to control an automatic door. That is not something I could have said a few weeks ago.

Fiona Campbell-Howes

Fiona is responsible for the strategic and day-to-day management of Radix, as well as working on many client writing projects. She has long experience of marketing in the tech industry, during which time she has worked with many global IT brands, including Adobe, CA, IBM and Oracle. Fiona loves turning complex topics into engaging and readable copy – the bigger the challenge, the better!