Assignment 8

I based this assignment off of my idea for assignment 6.  The person starts off “asleep,” or lying down.  When the photoresistor detects an increase of light, the person “wakes up,” sitting up.  The person can wake up in two different states, however.  If the photoresistor detects a lot of light, the person wakes up angry, and his eyes are red.  If the photoresistor detects more moderate amounts of light, the person wakes up happy, and his eyes are green.   The program resets itself automatically after 5 seconds.

The construction is simple enough.  You’ll need:

Foamcore

19 Gauge Wire

Chipboard

Photoresistor

3 LEDs (Green, Red, White)

Servo Motor

Arduino

Jumper wires, various resistors

Glue

 Just attach a short (2″-3″) piece of wire to the servo, and embed the servo into a wall of foamcore.  Cut out a chipboard person, including holes for the eyes, and hot glue it to the wire.  I found that by adding a second wall of foamcore closer to the chipboard person, I could ensure that the LEDs would only shine through the chipboard person’s eyes, and would not create a “halo” around the chipboard person’s head.

Here’s my code:  http://code.arc.cmu.edu/~cheng/uploads/HW_8b.pde

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: