Beka H's profile

Playing with Social Media activated Neopixels!

Playing with Social Media activated Neopixels!

The Proposal
As part of DN Festival of Light, my puppet company, Frolicked, was invited to perform an enhanced version of an existing performance piece, using new technology to provide a magical, light-based surprise for the DN Festival audience. 

Nótt is a moon-carrying, fortune-telling personification of the night sky. She is the Norse night goddess and comes chaperoned by a pair of magical companions: a talking crow perched on an enchanted tree. Frolicked’s version of Nótt is a spectacular walking puppet sculpture – a moon-bearing, rune-casting, lantern-carrying fortune-teller, who enchants her audiences with the lightning in her cloud of hair, the starlight on her costume, and the gentle sway of the orb she dutifully carries on her head.
The proposal for the event included the integration of lighting more fully embedded into a full body tree costume, and the really clever bit… making a new lantern for our 'Nótt' character that would react to input from social media (i.e. Twitter). Using a hashtag and an audience member’s colour request, Nótt’s lantern would change to the relevant colour with each tweet.

The Bad News is that I didn’t quite get the social media aspect of the technology to work in time to be portable (or ‘roaming’ as we street performers call it)… I managed to 'talk' to Twitter with the costume's LED lights (Neopixels), but getting the technology to be capable of working on the move was a lot harder than I thought it would be.

The Short Term Solution
I had to adapt our lights to change colour on a button press, which was controlled by the puppeteer hidden inside the Nótt costume.

The Equipment I Used
An Arduino
A couple of voltage regulators (which I built from scratch)
A 12V battery (for the LED lights)
A 9V battery (for the Arduino)
A set of Neopixels (programmable LEDs)
Lots of wires (!), a couple of proto boards and some solder

Programming
The Neopixel LED lights that provide Nótt’s lantern light are in a strip of 144 LEDs where each single light is programmable to be any colour. The controller for the lights is an Arduino – a relatively cheap microcontroller (in the form of a board) that you can upload coding to from your computer – coding which can control a range of devices, including strips of Neopixels.
For Nótt’s lantern, I had to find and adapt existing code (and sometimes write my own) which would program the lights to change colour, in response to different inputs.

I managed to create two sets of code. One set changed the colour of the lights via Twitter, the other changed the colour of the lights on a button press (as a back up, in case the Twitter feed didn’t work for any reason – I’m glad I did this!).

I wrote the fairly simple button press code from scratch. The code was uploaded directly to the Arduino (which could then be disconnected from the computer to run on its own).
The only slight alteration we had to make was to do with getting the colour values right. A bit of tinkering meant much better yellow and orange options than the recommendations on the Neopixel help website.
The Twitter code required two sets of code running at once – one that is uploaded to the Arduino, and runs when the Arduino is switched on, and the other which runs on a computer at the same time. The problem with this is that the Arduino needs to be connected to the computer in some way. For the code to work smoothly, the Arduino needed to be connected via an actual wire, and even then, the response time from Twitter was very slow indeed.
As you can see, it worked! I tried tweeting from different Twitter accounts and I tried all the colours – all worked fine. I even managed to quickly and easily solve the program timing out (with a quick search on Google, I found out that Twitter limits the number of searches anyone’s code can do over the course of a minute… all I had to do was ask our code to do slightly less searches per minute). The only problem I had was that the whole package wasn’t particularly mobile…

Twitter allows developers and hobbyists alike to access their feeds from ‘the back end’, via something called the Twitter API. Before Twitter changed the level of security for people to access this, it WAS possible to write code that could be run on JUST the Arduino – making it much easier for Nott’s circuitry to be portable. This year, however, Twitter tightened up this access and made this kind of code unworkable – which meant that I HAD to attach the Arduino to a second device (i.e. my laptop or another computer) in some way for the interaction with Twitter to work.

In the end, I just didn’t have the time to explore one of the two possible avenues:

1. Wirelessly connect the Arduino to my laptop. This would mean that the Arduino could be carried within Nótt’s costume, wirelessly connecting to the laptop, which could sit in a green room – as long as the laptop had an internet connection

2. Carry a portable computer to run the second part of the coding (such as a RaspberryPi computer – which is small and quite cheap) and integrate it into the costume, alongside the Arduino

I plan on exploring BOTH of these avenues in the very near future!

Portability
There were two issues where making things mobile were concerned:

1. How to power the 5V Arduino and the 5V Neopixel lights when the batteries I had were 12V and 9V respectively (because wiring them up directly would have resulted in damaged components and quite possibly a mini explosion!)

2. How to connect to the computer running the second part of the coding (for Twitter interaction)

To overcome the first issue, I found a YouTube video on voltage regulation and soldered together my own voltage regulators to convert both 12V and 9V to 5V. Here are some pictures of the finished electronics, along with a bit of explanation:
One of my little circuits failed after just one night of performance on 16th November, unfortunately. After having a quick search online (and after realising that the voltage regulator component gets VERY hot when 12V is running through it), I found a hobbyist who pulled apart a phone charger that plugs into a car cigarette lighter instead. The charger converts 12V to 5V with a different set of components – and they don’t get as hot. So already, I am making improvements that I wouldn’t have discovered without the support from DN Festival…

As far as Twitter is concerned, I'm working on it!

DN Festival’s Support
In terms of integrating technology into the heart of Frolicked's shows, DN Festival’s support for the development of our Nótt character has been incredibly valuable. Because of the support they have given me to explore lightweight, relatively cheap and portable electronics, along with emerging technologies, I have learned a huge amount and achieved a new way to interact with our audiences within our work. Although connecting to Twitter didn’t quite happen on the night, the technology I DID use became a surprisingly magical part of the show for our audience members in Doncaster, and I am committed to developing this further for future work, whether that takes the form of street theatre or not. The festival has been massively supportive of my experimentation process and the fact that I had to adapt these findings to make the show work on the night. Their support has undoubtedly informed the way that I integrate technology into my work from now onwards.

The Good News
I was almost successful at making Nótt's lantern change colour with Twitter… and I’m pretty sure that I'm not far away from a solution!
Playing with Social Media activated Neopixels!
Published:

Owner

Playing with Social Media activated Neopixels!

Published:

Creative Fields