PostHole
Compose Login
You are browsing us.zone2 in read-only mode. Log in to participate.
rss-bridge 2012-08-30T00:00:00+00:00

How to Make a SoundCloud Powered Children's Toy

Just over a week ago we had our first internal hackathon at
SoundCloud. You can read (and listen!) about it on our community
blog or read…


How to Make a SoundCloud Powered Children's Toy

August 30th, 2012 by paulosman

Just over a week ago we had our first internal hackathon at
SoundCloud. You can read (and listen!) about it on our [community
blog](https://blog.soundcloud.com/2012/08/20/we-hack/) or read
some of the awesome
press coverage
the event received.

We had over 60 people attend and over 20 projects were demoed. I
joined a team organized by
Josh Devins to build
ToyBox, a children’s toy that
plays sounds from SoundCloud in response to physical events. The team
consisted of myself, Horaci Cuevas,
Josh Devins, and
Oliver Hookins.

The first task was to come up with a design for our project. An
Arduino fitted with gyro, accelerometer
and motion sensors provided the interface between real world events
and the rest of the system. A Raspberry Pi
would then run the following pieces of software:

  • toybox:downloader - The downloader polls a webapp for data about what sounds from SoundCloud should be played in response to certain events. In order to make the toy more responsive, toybox:downloader downloads the sounds from SoundCloud and stores them on disk (The Raspberry Pi’s SD card).
  • toybox:serial - An app that listens for data on the Raspberry Pi’s serial port. Event data from the Arduino is printed out on stdout for other processes to consume. toybox:serial also uses 0MQ to push event data to a web interface so you can monitor a toy’s activity from a browser. The 0MQ consumer also responds to events by playing the appropriate sounds using toybox:playback.

Raspberry Pi’s MAC address) and associate SoundCloud sounds with
events, we built a simple Sinatra
application that we hosted on
Heroku. toybox:webapp
also provides a couple of endpoints that serve JSON describing what
sounds should be played when for a particular toy. This provided the
service endpoint needed by toybox:downloader.

Knowing what needed to be built, we each started hacking on a piece. Horaci
worked on toybox:serial, Oliver worked on toybox:downloader and toybox:playback
and I worked on toybox:webapp. Josh focused on the Arduino soldering and coding
and Oliver and Horaci helped get the Pi set up. You can see the Arduino code here.

There was a bit of frantic integration work at the end, but it did all come
together nicely. It was great to see sounds being played from SoundCloud
whenever a button was pushed, or the toybox was shaken, tilted or spoken to.

Making it pretty is a job for another hackathon :-)


  • ← Evolution of SoundCloud’s Architecture
  • The Next App Gallery Update →

Original source

Reply