Components and code

The logic

The flowchart and the pictures below show the interaction flow of Odo, step by step.


Holding the hand and lifting the opposite ear of Odo (microswitches, 1), the child can whisper a frustration into its ear (microphone, 2). When both the hand and the ear are released, the secret is recorded and Odo’s cheeks immediately blush and start to blink gently (LEDs, 3-4). The hand/ear gesture allows the child to play with Odo without the risk of recording something accidentally. If the child decides to let Odo tell the secret, he/she softly knocks on its back (capacitive touch sensor, 5) three times and Odo reveals the secret (audioshield, 6). Its cheeks gently turn off and the system is reset.

Circuit, prototype and components

The dolls have different behaviors, each powered by internal circuits created using Arduino Duemilanove and other technical components. The illustration shows the components used by Odo and the schematic drawing made with Fritzing.



The code

Odo is powered by a communication between Arduino and Processing codes. The hardest part of the code has been managing the recording because of its various states: recording if the buttons are pressed, stop and save the recording when buttons are released and the cheeks start to blush, playing the recording only when the sensor is touched three times consecutively. I managed this part by getting Arduino to send a specific signal for each of those actions to Processing, which played them with a specific line of code.

The two images show the communication of the value 4, which corresponds to the knocks on the touch sensor. You can download the whole Arduino code and Processing code and read the comment after each line to understand the whole system. In order to run the Processing program you must download two libraries: Minim and Serial.
Remember to put them inside the folder libraries, in your sketch.

Comments are closed.