Using Twitter to control a slot-car race - MistaJam vs Scott Mills

Tuesday 15 February 2011, 15:02

Patrick Sinclair Patrick Sinclair

Tagged with:

Scott Mills and Mista Jam

Editor's note: engineers in radio used to concern themselves with balancing audio and locating transmission towers but they now have a whole set of rather more pressing concerns - like how to stop slot cars spinning off the track when too many people tweet Scott Mills. Patrick Sinclair - a software engineer in the Radio 1 Interactive team - explains how connecting social networks with physical things (Using the volume of tweets from listeners to control a slot car race, to be specific) makes for good drivetime entertainment - SB.

Behind the scenes, we used:

The Scott Mills and Mista Jam slot cars

We built a computer-controlled 'fake controller' that plugged into the track, just like a normal manual controller. Slot car controllers are basically just variable resistors. We varied the resistance by connecting relays across resistive load. As we turned the relays on and off, it enabled and disabled the resistors, varying the speed of the cars. Each of the resistors were potentiometers, which allowed us to calibrate the speed of the cars ahead of the race.

The relay board was connected to a USB interface board, which was then plugged into a laptop. We wrote a custom HTTP-to-USB server to make it easy for the Ruby script to turn the relays on and off.

The hardware allowed for a range of seven speeds: from 'slowest' through to 'fastest' and then 'eleven' where the car would spin off the track and finally 'out of this world' where the car would literally spin off into orbit!

Nick Humfrey and Patrick Sinclair.

We timed how long the car would take to track for each of the speeds so in theory each tweet would make the car go around the track once. Each car would have a queue of outstanding laps based on the number of tweets received, and the size of this queue would affect the speed the car ran at.

Compared to our previous efforts, using SMS messages, Twitter's API was amazing because we could get real-time feedback - within seconds of users tweeting, the car would respond. With the SMS feed, there was a delay of a couple of minutes between a message being sent and us receiving it.

The lessons were:

  • It was incredibly difficult to calibrate the system. There were too many variables - from variations between the cars, how the brushes on the cars were set up and how the resistors performed. It also performed very differently once the cars and resistors had warmed up.
  • It's hard to anticipate the volume of tweets. We received 82 tweets in one second at the start of the race while we were anticipating a few hundred during the course of the race. So we had to tweak how the system was set up a couple of times during the race, causing the cars to stop whilst the system rebooted.

For next time:

  • We'll allow the configuration to be changed without having to restart the system.
  • Be more accurate by measuring when the cars actually cross the finish line as opposed to guessing how long it took the cars to go around the track.

Patrick Sinclair is a software engineer at BBC Radio1

Tagged with:

Comments

Jump to comments pagination
 
 

This entry is now closed for comments

Share this page

More Posts

Previous
Peter Horrocks' somewhat smaller world

Friday 4 February 2011, 14:00

Next
Daily live concerts on BBC Radio 3

Friday 18 February 2011, 11:10

About this Blog

The BBC Radio team explain their decisions, highlight changes and share news from all of BBC radio.

Blog Updates

Stay updated with the latest posts from the blog.

Subscribe using:

What are feeds?

Most Recently Commented