20
edits
Changes
no edit summary
I want to make a tongue-in-cheek commentary on President Yudof's yearly salary, which is 540,000 a year (while President Obama makes 400,000).
I got a sound chip from a greeting card that plays the song "Taking Care of Business," the meaning of which is that Yudof treats the UC system like a business, raising student fees by 15 percent instead of cutting administrative salaries or cutting back on construction. It activates every time someone opens the cookie jar. I chose the cookie jar because of the saying of "having one's hand in the cookie jar." In my opinion Yudof is taking too many cookies.
The project is metaphorical, the technology of the speaker serving image and the image serving language, so really, it's an old-fashioned sort of project. The cookie jar is meant to have a very kitschy quality, Yudof looking rosy cheeked and benevolent like he knows what's best for everyone.
To do this, I got a light sensor, and activated the sound depending of if there was enough light past a threshold of 100 coming from the analog input. I took out the batteries of the sound card so that arduino powered it. I tried it with the batteries in, but I couldn't get it to stop playing. I decided to use the threshold instead of a transistor because it didn't work (I thought I might have put it in backwards, but it didn't work facing either direction). This is the codethat I finally made:
int sensorPin = 2; // this is for the light sensor input