Title: “Three Little Pigs” Pop-up Book
Description: Based on the childhood story of Three Little Pigs, this project will bring the scene of the wolf blowing down the three little pigs’ house down to life, using light-up and interactive components
Schematic sketch for LED and flex sensor component
Schematic sketch for fan component
List of potential interactions:
Flex sensor
When the flex sensor is stretched, book is closed (LED off)
When the flex sensor is loose, book is open (LED on)
Backup sensors if this one doesn’t work: Photoresistor, stretch sensor
Button to change light mode on LED’s
Fan: Analog input → FSR press, Analog output → fan speed in motor
Pseudocode:
If the flex sensor is loose (low reading), then the LED shines white
If the button is pressed the first time, LED shines white
If the button is pressed the second time, LED shines red
If the button is pressed the third time, LED shines green
If the button is pressed the fourth time, LED shines blue
The stronger the FSR press, the faster the fan speed.
Timeline:
Week 1:
Draw schematic
Build working circuit with LED’s and flex sensor
Week 2:
Add Fan component
Pop up book paper prototype (the cover is cardboard and the flex sensor is attached on the bac where the spine is).
Working flex sensor wiring with FSR attached. The FSR hasn’t been attached to any computation or output yet.
Working code! Flex sensor method is a success. 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” will be useful later on so that all the interactions only happen if bookOpen is true. All of the LED interaction that Chris has been working on this past week will go here. The number 3 was found using flex sensor testing of opening and closing the spine.
In the other parts of the code, I started working on fsr —> servo motor interaction, but it wasn’t working properly. I will continue to investigate why that may be this coming week.