Week 2 Writing Response
The project link: https://makingtoys.net/2011/02/07/lucysam-are-brothers-and-sisters/
1. Explain (in a nut shell) your code – structure, logic, important parts.
My small teddy bear is sensitive to light, I use a photo resistor to measure the level of light. I wanted to code it in a way that he seems to like dark better than light by making calmer sounds when it’s dark and making crazy noise when it’s light. My code starts by defining the pins for the speaker and the LED light. It then reads values from the light sensor. Then i mapped the values that I read from the sensor to the frequencies the speaker can play using the “tone” function. I have 3 different frequency ranges that are changed with the values of the sensor.
I also mapped the brightness of the LED light to the sensor values, so the LEd gets lighter when the light is up and sound is getting crazy. LED gets darker when the room gets darker, like the bear finally found some peace to go to sleep. I intentionally chose blue light as this is a boy.
He actually has a sister, which is doing the reverse action, getting peaceful with light and go crazy with dark. It is programmed by my partner Kate.
2. What did you do that you feel is new, non-obvious and useful?
The bear looks cute and when you first look at it, it’s just a toy that makes a weird sound with a LED light on. However, the sound starts to change unexpectedly when you make even a little move towards it, as it gets affected by light changes. Suddenly, you feel like it somehow is talking to you, it is not a toy that sits there by itself, instead, it wants you to get involved and play with it. It is not playing melodies and the sound it makes is very obnoxious, because, I wanted it to emphasize the importance of reaction in there. I dont know if it’s useful, but it’s somehow different than classic toy in a box.
Reply