Components and code

The logic

The flowchart below shows the logic of the system step by step.

hsh

Tello works in a group of children, each one with their own Tello, and a set of 16 lollipops shared among them. The dolls detect each other and make a sound. After a few seconds, the tongue of one Tello glows in a random color (RGB LED, 1). The associated child puts one of the four lollipops (audio tag, 2) of the corresponding color on Tello’s tongue (RFID reader) and it reproduces the related sound. So the child starts to tell a story based on that sound (3). After a few seconds, Tello’s tongue start to blink then turns off. Thatchild’s turn is then finished. Randomly, another tongue turns on in a random color indicating the next turn (4). The next child will do the same thing as the first one, with another lollipop of the corresponding color of the next light, and he/she will tell another part of the story linked to the previous one (6). And so on. The children finish the game by shaking (tilt sensor, 7) their Tellos. When all the Tellos have been shaken, they turn themselves off and reset the system (8).

Circuit, prototype and components

In this case the components are a bit more and they would not have been easy to manage. The illustration shows what the real components would be. Below is the drawing of the circuit made with Fritzing.

gfagf

djtyd

The code

As I said, I created just a fake prototype setting the several times in which every action should happen to demonstrate the working of the doll. I made two buttons: if you press the first one the program starts, a blue light turns on inside the tongue, and after 10 seconds the sound of rain is played. After that, if you press the second button, the light blinks quickly, indicating that the time is up. All these things are managed by a communication between Arduino (first image below) and Processing (second image below): the first one sends a signal when a button is in the right state; the second one, having received that signal, plays the related sound. Download the Arduino and Processing codes. 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.

jgfsj

Comments are closed.