Posts Tagged ‘r2d2 r2builders iPhone remote control sound vmusic2’

Sound control, iPhone speaking

December 8, 2008

This weekend I was able to get the iPhone to control the R2 sounds using a vmusic2 module from Mouser, speakers from Fry’s electronics and a mini amplifier from David Navone engineering. Like the servo control, using the iPhone, this method uses the same microcontroller and the same communication method via wifi with the OSC protocol, running an free app on the iPhone called mrmr. Taking a cue from Chris James, I added buttons that control banks of sounds for different moods or r2 sound types. I went through the sounds I have and sorted them into categories like chatty, sad, happy, whistle, raz, mad, question, processing, holo(leia), dance(cantina music), and a couple others I can’t recall right now. I wrote some code for the microcontroller so that every time you press the sad button on the iPhone, it will play a random clip from the sad set of sounds. I also setup buttons to play all sounds (the “V3A” command on vmusic2 module), stop playing (“VST”) and switch off random mode, skip to next directory (“VSD”), and a slider widget for volume control (“VSV”). I also added a button to go into random mode where r2 will play a random sound at a random interval, so you don’t have to keep pressing buttons to make some noise.

Next up will be controlling the J.E.D.I display with the iPhone and tying that into sound control.

Another cool thing I will work on is feedback from R2 to the iPhone. I should be able to display messages or status on the iPhone display from r2 when needed say like battery level, error messages, what modes are on/off, and the state of various subsystems.

Advertisements