Light-Sensitive Noise Monster

http://vimeo.com/upload/video

Working with the code we made last week to create different emotional gestures through sound, this week our task was to make creatures that responded to light using a photoresistor, either by loving light and hating dark, or hating light and loving dark. I partnered up with Bree Rubin to make two characters that were somewhat diametrically opposed. My creature is a predator of sorts that gets excited when darkness comes, as if that were the time it hunts. Bree’s creature is meant to be my creature’s natural prey, and so it fears the dark and loves the light.

sound creature's lowly beginnings

a monster in progress

Another part of the assignment was that the light sensor wasn’t supposed to act as if it were a switch, but that changing light should affect it over time, in some sort of life-like way. Both of our creatures get happier or sadder based on their preferences, and these shifts happen over time. If it is light for a long time, my creature continues to get sadder and sadder. However, if there is an abrupt change in light levels, our creatures react in much stronger ways. For instance, if it is dark in the room but suddenly the lights come on bright, my creature will scream and very quickly be depressed. If, on the other hand, there is a lot of light and it suddenly gets dark, the creature will have a sudden burst of happiness and his mood will be shifted much quicker.

Additionally, if either of our creatures are in their negative state for too long, they die, and can only be revived by making the room completely dark (in the predator’s case) or completely light (in the case of the prey).

Here’s the code that runs the predator. The loop() handles all the logic and tracking of light levels and happiness and it runs various functions to indicate what emotion the speaker is supposed to convey.

Also, here are my thoughtful written at the beginning of last class.