“Three Little Pigs”
by Helen Lin + Chris Weiliang Toh
Description: Based on the childhood story of Three Little Pigs, this pop up card will bring the scene of the wolf blowing down the three little pigs’ house down to life, using light-up and interactive components when opened.
Project Interaction:
Flex sensor
When the flex sensor is stretched, book is closed (LED off)
When the flex sensor is loose, book is open (LED on)
Button
Button → change light mode in LED’s
Digital input (button) → Analog Output (RGB LED)
Fan
Analog input (FSR sensor) → Analog output (DC Motor)
Project Pseudocode:
If the flex sensor is loose (low reading), then the LED shines
If the button is pressed the first time, LED shines red
If the button is pressed the second time, LED shines blue
If the button is pressed the third time, LED shines green
If the button is pressed the fourth time, LED shines random color
If the button is pressed the fifth time, LED shines a color changing random color
If the button is pressed again, it repeats the order from red.
If the FSR is pressed, the fan spins.
This was an early stage of the pop up book with the flex sensor and first DC motor installed. Sketches of the four main characters were included to help set the scene.
When trying to use power from an external source, we accidentally fried a series of yellow LED lights strung together and an Arduino! RIP Chris’s Arduino. We could tell it was fried because it was overheating whenever plugged in and wouldn’t show up in the port on the computer.
Wiring with all the soldered RGB LED lights installed. In this version, a speaker was added to make a sound every time the book was newly opened or closed. Later on, the speaker was removed due to changing out to a higher V DC motor.
Close-up for the Arduino wiring. The LED wires can be found in the top right. The DC motor wiring is on the left. The button is in the middle. The arduino with I/O ports is on the bottom.
In the code, the flex sensor reading gave output from 150 (unbent) to 450 (bent). I mapped this reading to a 0 to 10 scale just to make it easier to decipher in the code. If the flex sensor gave an output to be greater than 3, then the declared boolean variable “bookOpen” will be true. This boolean “bookOpen” helps indicate when the interactive components should be read. The FSR and LED lights + motor will only work if the book is open.
“mode” is a variable that keeps track of the current LED state. The first three modes are red, green, and blue, respectively. Mode four is a random color. Mode five is a random color that changes over time. To make sure mode five works, we added a function checkChangingRGBDir() where it not only made sure that the incrementing or decrementing value is kept within bounds, but it would also store whether the value needs to go up or down (to make the color changing feel gradual).
This code checks if the button is clicked (and it is a new click). The debounce helps remove digital noise. The random() function is only called if the mode is newly fourth [3] or fifth [4], because those modes call for random colors.
DEMO: Pushing the button allows you to switch between LED light modes.
DEMO: Pressing the FSR sensor allows you to activate the “wolf’s breath” in blowing the house down (DC Motor).
DEMO: The lights and interactivity only works if the book is open (detectable using a flex sensor on the spine).
Feedback (Ideas for Expansion:
Change plug out for power battery to make it more portable
Currently the interaction feels more reactive than interactive. What are some ways to create more discovery and curiosity?
Perhaps have some pages without electric components, so when you enter the interactive page, it’s very noticeable
If you wanted to continue to use soft materials, look into:
Ribbon cable, silicon wire
Copper tape often used for paper projects
Can be cut with vinyl cutter to create complex drawings
Jie Qi: Chibitronics
Z tape (more expensive)
High-low tech (research group at MIT Media Lab):