Personal tools
You are here: Home Blog SnoRRRhea is alive

SnoRRRhea is alive

Setting eyes on SnoRRRhea and making her talk (to SuperCollider).

So we've got ourselves a new pet.  When you look at the picture, you can see that it's even got two eyes (buttons), a nose (microphone), and a mouth (LCD) to talk with us.  Just like with the xkcd comic, the body actually fits an Eee PC, which means that the overall cost of this buddy is around 300 €.  But remember that it's a prototype, right. :-)

Other things that we added since last time:

  • Arduino is talking to SuperCollider now using a very simple protocol.  There's three messages: MSG_ALARM_OFF for when the alarm is turned off, MSG_ALARM_ON for when it's turned on and MSG_ALARM_TRIGGER for when the alarm goes off.  The communication is fairly low tech.  On the Arduino side we use Serial.print and in SuperCollider we use SerialPort.read to write and read individual bytes respectively.  It should be noted that there are more powerful ways to communicate between the two, namely with the SimpleMessageSystem library which has support in SuperCollider, but for our simple use it was overkill.
  • We added two buttons for configuring the clock.  The first button changes through three modes, where the second button adjusts the setting for that mode.  The first mode lets you turn the alarm clock on and off.  The second and third mode allow you to set the alarm time's hour and minute.  We had to completely rewrite the loop function to allow for proper response times to button presses.  All button presses give visual feedback on the LCD display.
  • The SuperCollider patch was also slightly changed.  Firstly to implement the receiving of messages from Arduino, and secondly to adjust the way that the recorder and player work.

You can download the code here:

We're really happy with the results.  Waking up with a compressed recording of the sounds you made at night makes the alarm clock very... effective.  It's also a lot of fun to just record conversations and play them back.  With all the breaks between your sentences removed, it sounds like you've had way too much caffeine.  Let us know if you can think of other fun applications for this.

Document Actions