On Monday April 25th, we narrowed down the functions of our teddy bear to a more singular interaction: storytelling. For the simplicity of our project, we'll put this storytelling experience in the context of night time, to encourage the process of falling asleep.
Our first attempt at coding the interaction took inputs and outputs into account:
WAKE UP
Child jiggles or squeezes teddy (belly?) to turn it on
Light fades on
plays audio greeting
asks whether child wants to resume old story or start new one.
START STORY
starts story at full volume
starts new story
or
resumes old story from slightly before it faded out last time
INITIATE FADE SEQUENCE
initiates volume+light fade and timer (each sequence is 15 min broken into 3, 5min sections)
significant jiggling (passive or actively triggered) restarts volume+light fade timer & kicks volume up one level from current volume or down one level from initial volume) (3 defined levels + off)
(PASSIVE OFF)
ACTIVE OFF
squeeze to turn light and audio off
After writing up this sequence of events, we began narrowing down which types of sensors we would be using for this process. We realized we would need a way to store and play back audio. We decided on the Adafruit Wave Shield, for it's ability to read off of a sim card and adjust volume. We also need sensors in order to detect vibration or movement when the child wants to increase notify the device that they are still awake. For this we decided upon flexible jiggle sensors, with weights on the end to make the shake more noticeable.
Our second attempt at pseudo coding was more detailed and took into account sensors we might be using:
if bear is squeezed or vigorously jiggled
{
fade light on
play audio greeting
}
if audio playback marker is >0 && <end of play back {
play intro question "We were in the middle of the story, squeeze (x) my hand (y) if you want a new story."
if ____(x)_____ is squeezed(y) {
play intro 1 "here's a new story..."
start new playback
}else{
play intro 2 "this is where we left off..."
start playback at marker -3(?) minutes
} else{
play intro 2 "here's a new story..."
start new audio track
}
countdown starts
if teddy is jiggled {
- x minutes from the countdown restarts
}
if countdown timer is at y
- audio slowly fades out
We envision our teddy bear to tell a story with ample time for the kid to fall asleep. While story is told, lights will fade to encourage the process. If the kid is still awake, the kid notifies the device and the story will continue forth until the kid falls asleep.
No comments:
Post a Comment