A3: Craigslist Heuristic Evaluation

Group Members:

Xin Yang Yak (xyak@)
Gabriel Chen (gcthree@)
Peter Yu (keunwooy@)

i. Most severe problems

The most severe problems we found with the site are listed as follows, with their corresponding violations:

H2: Unrealistic names and uncommon abbreviations for discussion subforum links.
H6: Homepage is recall dependent, lacking icons for recognition.
H7: Lack of login page impedes efficient use.
H8: Discussion subforum interface is cluttered and not minimalistic.
H10: Help function uses google site search and documentation is not thorough.

ii. Problems exposed by Nielsen’s heuristics

We wouldn’t have thought to look at the help functionality of Craigslist if it weren’t included in the list of heuristics. The problems with its functionality were exposed by the list.

iii. Usability problems beyond Nielsen’s heuristics

The site was aesthetically bad and discourages users from using it. The site looks unreliable, which is not a good quality for an ecommerce site.

Possible additional heuristics should thus incorporate the site’s look and feel, and how welcoming it is toward a user.

iv. Class discussion questions

1. What are the limitations of Nielsen’s heuristic evaluation?
2. What are the shortcomings of Nielsen’s heuristic evaluation?
3. Apply heuristic evaluation to the HCI course website.
4. What is the timeframe of Nielsen’s heuristic evaluations? Will the evaluation criteria persist as technology evolves?


Xin Yang: https://docs.google.com/document/d/1LwwD1IGgCtKNfSXfeZU5TNabKaD32M2Srjl3vhDrHp0/edit?usp=sharing

Gabriel: https://www.dropbox.com/s/xs801hxemaiwa5b/A3.pdf

Peter: https://www.dropbox.com/s/zpwhr9btafk3f1b/inclass.pdf

L2: Bop It

Group 15: Prakhar Agarwal (pagarwal@), Gabriel Chen (gcthree@), and Colleen Carroll (cecarrol@)

Initial Prototypes:

Our first attempt at making an instrument out of a frisbee. One prong has a flex sensor underneath so the prong can be bent to control pitch.

Source Code: See source code for final design.

Prototype 2 uses the same base to control different elements. This time we have added a button to make the tone play only when it is pressed, as well as a rotary potentiometer for volume control.

Source Code: See source code for final design.

For the last prototype, we tried something completely different, and came up with a pretty good Halloween or horror movie music maker.

Source Code:



Reads an Analog Devices ADXL3xx accelerometer and communicates the

acceleration to the computer. For AdaFruit ADXL335 breakout board.

Modified from code at


The circuit:

analog 0: Vin

analog 1: 3vo

analog 2: ground

analog 3: z-axis

analog 4: y-axis

analog 5: x-axis

test pin is hanging off the edge :)

created 2 Jul 2008

by David A. Mellis

by Tom Igoe

modified 19 Feb 2013

by Rebecca Fiebrink

This example code is in the public domain.*/

// these constants describe the pins. They won't change:

const int groundpin = A2; // analog input pin 2

const int powerpin = A0; // analog input pin 0

const int xpin = A5; // x-axis of the accelerometer

const int ypin = A4; // y-axis

const int zpin = A3; // z-axis

void setup()


// initialize the serial communications:


// Provide ground and power by using the analog inputs as normal

// digital pins. This makes it possible to directly connect the

// breakout board to the Arduino. If you use the normal 5V and

// GND pins on the Arduino, you can remove these lines.

pinMode(groundpin, OUTPUT);

pinMode(powerpin, OUTPUT);

digitalWrite(groundpin, LOW);

digitalWrite(powerpin, HIGH);


void loop()


// print the sensor values:

// print a tab between values:



// print a tab between values:




int xfreq = analogRead(xpin);
int yfreq = analogRead(ypin);
int zfreq = analogRead(zpin);

tone(8, xfreq+yfreq+zfreq);
// delay before next reading:



Description of Final Design:

Our group built a an instrument that can be played by 1-3 people. Our inspiration was essentially creating a musical Bop-It. Each end of the three-prong instrument has a different control over the sound. We liked that the instrument can be played by a range of people, our project can be the basis for a solo, duet, or trio piece. The device is limited in the range of interactions. While there are multiple useful controls, each sits on the unmoving object. With one more iteration we may have included the accelerometer to make a moving object. Additionally, we can only play within one octave because of limitations with the size of the Overall, we found the final product a fun and interesting challenge for multiple players.

In this instrument, as mentioned before, each prong of the frisbee controls a different musical aspect of the sound that the buzzer plays. One has a button to control when the tone is made. A second has a rotary potentiometer to control volume. The third will have a sliding potentiometer that determines the pitch.

Source Code:

#include "pitches.h"
/* FSR simple testing sketch.

Connect one end of FSR to power, the other end to Analog 0.

Then connect one end of a 10K resistor from Analog 0 to ground

For more information see www.ladyada.net/learn/sensors/fsr.html */

int slidePin = 0; // the FSR and 10K pulldown are connected to a0

int buttonPin = 9;

int slideReading; // the analog reading from the FSR resistor divider

int buttonReading;

void setup(void) {

// We'll send debugging information via the Serial monitor



void loop(void) {

slideReading = analogRead(slidePin);

Serial.print("Analog reading = ");

//Serial.println(slideReading); // the raw analog reading


int freq;
if (slideReading < 125) {
freq = NOTE_C7;
else if (slideReading < 250) {
freq = NOTE_D7;
else if (slideReading < 375) {
freq = NOTE_E7;
else if (slideReading < 500) {
freq = NOTE_F7;
else if (slideReading < 625) {
freq = NOTE_G7;
else if (slideReading < 750) {
freq = NOTE_A7;
else if (slideReading < 875) {
freq = NOTE_B7;
else {
freq = NOTE_C8;
/* buzzer in 8th pin */
while (true) {
tone(8, freq);
buttonReading = digitalRead(buttonPin);
if (buttonReading == 0) {


Three-Prong Frisbee
10K Resistor
3 Small (Red) Breadboards
1 Large Breadboard
Electrical Tape


Firstly, wire the buzzer on the large breadboard and hook it up to the Arduino.
Set the button in one of the small breadboards and connect it to the buzzer so that the buzzer will now only play when the button is pressed.
In one prong, cut a hole and place the button through it. Tape it in place.
Next, set the rotary potentiometer in another small breadboard. You will wire this to the buzzer, replacing the resistor in the buzzer circuit with the rotary pot.
Cut a hole in another prong and place the rotary pot though it. Tape it in place.
Lastly, wire the sliding potentiometer on a small breadboard and attach the output to an input pin on the arduino. The code below shows how we map the potentiometer readings to buzzer frequencies.
Cut a hole in the frisbee on the last prong and slip the sliding pot through it. Tape it in place. You now have a musical bop-it!


A2: Gravi-Keys


(MAE 305 lecture and HCI lecture) In the CS 104 lecture hall, the seats are tightly spaced. Frequently, those who sit on the sides of the lecture hall need to get up in order to let others through. This can be an inconvenience and is uncomfortable for those sitting in the lecture. Another observation I made was that many students who make the long walk to the CS building blow on their hands for warmth upon entering lecture. They do so in the 10 minutes before lecture in order to prepare for the note taking or typing they will do during the class.

(MOL 348 lecture) In this lecture, the professor asks questions to the class in the form of clicker questions. In the 10 minutes before class, I asked a student about any inconveniences she had experienced with the iclicker system, to which she responded “I forget my clicker all the time!” I then decided to observe the class for other students who have had the same problem. Sure enough, in the first 10 minutes, one guy dug frantically through his bag before letting out an exasperated sigh. Perhaps a better system could be devised.

(At ORF precept) I observed my preceptor as he walked into the classroom shortly before the start of precept. One thing I noticed was that, although he shouldered a laptop bag, he was holding a lot of things in his hands instead of placing them in the bag. Among the things he was holding were a textbook, notebook and Macbook. With all things out, he was able to set up for the precept quickly, but the walk to the classroom looked uncomfortable and potentially hazardous. He then proceeded to put some notes on the board and check the time.

(On the way to ECO 101 lecture) On the walk to lecture, I observed many people walking with a cup of tea or coffee in one hand, and a phone in the other. Activities on the phone varied, from making a call to sending texts. This is hazardous to phones, as dropping a phone while walking is a common occurrence and results in many broken screens. One girl I observed was holding a tall cup of coffee in addition to a set of notebooks while texting. She looked flustered as she struggled to type out her message.


(Collaboration with Jae Lee)

  1. Hand warmer mats on desks, activated when they sense force
  2. Poll/attendance at entrance of lecture hall/precepts for classes that take attendance
  3. Poll/attendance at exit of lecture hall that discourages people from leaving early
  4. App that tells you where your friends are and if seats are occupied in a lecture hall
  5. App that has a map of the lecture hall that you can use to “reserve” seats for friends
  6. App that tells you outlet locations in lecture halls and if they’re currently being used
  7. App that lets bikers press the crosswalk button without getting off their bike
  8. App that wakes you when you doze off in lecture or even before the lecture starts
  9. A live chat app OIT that is accessible on all computers built into lecture halls
  10. An app that cancels odor when it detects that you fart or burp in a lecture hall
  11. A system that lets professors see what they’re writing from the back of the room
  12. A portable device that can project things clearly onto a blackboard
  13. A device built into a blackboard that erases it automatically from the previous class
  14. A system that allows for delivery from restaurants directly to your lecture hall
  15. A device that scrolls your phone by following the movement of your eyes
  16. A keyboard that condenses keys to whichever hand you hold the phone with

Favorite Ideas:

11. See what you write

I chose to prototype this application because it has the potential to benefit the overall learning experience of students, and because I wasn’t exactly sure how the system would work.

16. One handed keyboard

I chose to prototype this application because I wanted to get user feedback for it in hopes of both improving the details of its design and solving the problem that I observed in people walking to class while texting with one hand.


Blackboard Visualization App:

Professors can use this app before and during lectures while they write on a blackboard using a camera from the back of the room perspective. The goal of the app is to allow for neater presentation of material and to make professors more conscious of how large they write on a board. Additionally, professors would no longer need to inquire, “can everybody see this in the back?”


The idea behind this app is that there is an external sensor that detects how many hands you are using to hold your device. If it senses that you are using one hand to type on your phone, the keys will automatically gravitate toward the hand. This decreases the area of each key and space between keys, but the idea is to allow for the reaching of far away keys, such as P and “Send” for the left hand and Q for the right hand. This makes texting while holding other things easier, especially for students going to class.

User Testing: 

I had users test Gravi-Keys. The feedback I received from the tests was tremendous and helped me improve upon many aspects of the design. Based on which hand the user was using to test out the design, I asked users to spell out a word on the screen using only one hand that would require them to stretch their thumbs.

Nora Chen:

Nora enjoyed all configurations of the application. Her small hands made it difficult for her to spell out words containing the letter ‘P’. She was the first to demonstrate that having the “Send” button on the right side of the screen greatly inconveniences left-hand phone users, and contributed to the initial design of just shifting keys by adding button shifts as well.

This user was able to text while taking a sip of her drink.

This user was able to text while taking a sip of her drink.

David Newell-Smith:

David was holding a drink while he tested. He had difficulty spelling out words containing the letter ‘Q’ on the regular configuration. He felt that the right hand vertical configuration made the keys too small, as his thumb was quite wide, but felt that the horizontal configuration was more promising.

This user realizes the difficulty of typing with one hand on the normal keyboard.

This user realizes the difficulty of typing with one hand on the normal keyboard.

Stephen Wang:

Stephen, like David, preferred to use the horizontal configuration over the vertical configuration. He said the smaller keys of the vertical configuration would have been an inconvenience, but the horizontal configuration suited him.

This user enjoys the benefits of the right hand horizontal configuration. He was satisfied with the results.

This user enjoys the benefits of the right hand horizontal configuration. He was satisfied with the results.

Oladoyin Phillips:

Oladoyin was able to successfully use the app while holding a book, which was something that many students did during my observations. She had difficulty typing out the word on the normal configuration, but benefitted from all shifted key configurations.

This user is able to text while holding a book.

This user is able to text while holding a book.

Nana Kwasi Boohene:

Nana’s long fingers made typing on the normally configured keyboard easy, but he agreed that the new configurations allowed for gripping the device more securely. He was the first to point out that the design should include key shifts for both right and left handed phone users.

This user is able to text while holding snacks and a drink.

This user is able to text while holding snacks and a drink.


  • Users generally voiced concerns about how the device would actually detect how a user is holding it. This problem has yet to be worked out.
  • When testing the left-handed horizontal configuration, one user pointed out that the current message bar should not grow downward and change the position of the keys. Instead, they should grow upward on the right side of the screen. I made this change when making the right-hand horizontal configuration (see prototype photos).
  • For the Gravi-Key configurations, users had the easiest time reaching the furthest keys in the normal configurations, but the closer keys became harder to hit due to the inflexibility and large area of the thumb (i.e. ‘P’ became easier to hit than ‘Q’ for a left-hand user and vice-versa for a right-hand user). A correction was made to make the leftmost keys larger and the rightmost keys smaller for the left-hand configuration and the same for the right-hand configuration.
  • Most users preferred the horizontal configurations to the vertical configurations in terms of how useful or accurate it would be.
  • One user pointed out that other texting methods such as swipe could resolve the cramped setup in the vertical configurations.
  • Another user suggested that the space created when keys gravitate can be used for more display area, other buttons, or even ads
  • All users were pleased with the design and wanted to see more! They agreed that texting with one hand could be inconvenient at times, and that this product could potentially be of help to them.

Life Hackers P1

Group Members

Colleen Carroll (cecarrol@)
Gabriel Chen (gcthree@)
Prakhar Agarwal (pagarwal@)

I. Brainstorm

  1. Cell phone alarm clock extension, through maybe the speaker port or MicroUSB port, that uses muscle pulses to wake you up.
  2. Kinect based alarm clock that will ring if it doesn’t recognize that a body has moved out of the bed
  3. Alarm clock that vibrates the entire bed when it goes off (vibrations can be achieved by putting something like an eraser off center on a motor).
  4. Proximity alarm that tests for human presence using a combination of different sensors (temperature, photo, visual shape?). This can be used as a homemade security system.
  1. An AI “RCA” that complains if the noise levels in a room are too high by using volume sensors.
  2. “RCA” system that uses a combination of temperature, noise, and light sensors (rave lighting?) to sense whether a party is going on in the room and complains.
7. FootMouse

7. FootMouse

  1. *** Foot pedal based mouse so that one can use the keyboard and mouse simultaneously
  2. Facial movement and gesture recognition system that lets you control different operations in a computer interface by actions such as winking or moving your mouth in different ways.
  1. Automatically adjusting backpack straps with a force sensor to determine whether the backpack is being used and adjust to allow for best back support.
  2. Backpack straps that open up to allow a user to get arms in easily when picked up and then go back to the original setting after the backpack is on.
  1. There’s already hand-based controls for lights (snap your fingers to turn on/off the lights); what about blowing out lights in the same way you blow out candles?
  2. Control the lights in a room by covering or uncovering a photo sensor to a certain extent. This would be intuitive and easy to do!
13. MatchMirror

13. MatchMirror

  1. A mirror that checks the coordination of your outfit to your skin color, body type and other parts of the outfit.
  2. Use the kinect to help you cut your own hair. It shows the user how to cut their hair to a particular style and uses gesture recognition to correct the user as they go.
  3. Use the Kinect to recognize your face shape and recommend hairstyles that are the most flattering.
17. SignGlove

17. SignGlove

18. RepGlove

18. RepGlove

  1. *** “Secret handshake” glove that unlocks bikes, doors, laptops that can be programmed with certain gestures
  2. *** Sign language glove that recognizes what is being signed by a person wearing it in order to transcribe it onto the computer.
  3. *** Fingerless glove for lifting weights that records how many reps you do to an interface that records your workout progress and whether or not you are meeting your goals.
  4. *** A sensor on your clothes (flex, etc.) that recognizes good form in exercise moves and stretches (push ups, planks, sit ups, running, swimming)
  5. A glove that tells you which notes to play on the piano
  6. A gesture-controllable glove to control household tasks (is the stove off? find your keys?).
  7. Glove that recognizes gestures for different functions that may be useful while driving such as picking up the phone (move thumb to ear and pinky to mouth like a telephone).
  1. Webcam attached to your face that, when you point or gesture to certain parts of a book, takes notes or snapshots of active areas.
24. SafeStove

24. SafeStove

  1. A sensor on a dangerous object (stove, table saw) that detects the proximity of your finger and turns the object off when you’re too close.
  1. An application that tells you which notes you’ve played and records them to a computer program that transcribes the music
26. HydrationBottle

26. HydrationBottle

27. DetoxFlask

27. DetoxFlask

  1. Water bottle that keeps a log of how much water you intake during a day by sampling the weight of the water periodically. Lights up if at a given time, you haven’t had enough of the water.
  2. Alcohol flask that keeps a log of how much alcohol you’ve had during a night by sampling the weight of the alcohol periodically. Estimates BAC and displays on flask.
  3. A flex sensor on the ketchup bottle that lights up different amounts based on how much ketchup is in the bottle, the orientation of the bottle, and how hard you’re squeezing.
  1. Pressure sensors on your bike brakes and handlebars that light up brake and turning signals (useful for drivers trying to avoid bikers).
  2. Pressure sensors on your shoes that light up turning signals when you turn on your feet (useful for bikers trying to avoid pedestrians).
31. VolleyHelper

31. VolleyHelper

  1. Accelerometer and pressure sensor on a volleyball that detects and lights up when you should hit a volleyball when it’s falling (useful for people trying to learn when to begin an approach to serve).
  2. A device that detects your posture and helps you improve it using classical conditioning
  3. A Kinect based application that helps you improve your presentation skills by looking at both physical cues (such as posture, nervous habits) and audio cues (number of “um”, “like”, etc)
  4. Presentation tool to write or draw in the air and transfer to screen.
  1. A system that can listen to users singing (often imperfectly) and use machine learning to determine and transcribe the notes they are actually trying to sing (or at least those that would musically make sense)
  1. Using kinect, a waste bin that senses the waste item, classifies it as a particular type of trash and opens the appropriate hole for deposit
  1. Pressure-sensing belt that tells you when to stop eating.
  1. Application that recognizes human presence in a lecture hall and control the blinds to direct light towards locations where it won’t get in people’s eyes
  2. Remote controlled vehicle for which the remote is based on one’s hand movements (point forward to move forward, rotate wrist to turn, etc)
  3. A sensor that can detect the need for handicap facilities such as an automatic door by recognizing the image of a person on a wheelchair or crutches.
  1. A better tape measure – use a fixed armspan as the base, put a sensor on each hand and use specific gestures.
  2. 3d drawing like on a 2D tablet. Use a simple stylus that is easily detected and draw in the air to add the model to CAD.
  3. Kinect in the hallway to direct and measure traffic during an emergency, and safely help people exit the building.
  4. Vending machine where you point to the item that you want (using kinect).
  5. Solve a puzzle on a gift box to make the gift opening experience more interactive! For example, a Christmas gift box that has a countdown on the box, with a new puzzle every day.
  6. Stethoscope that lights up when there is a heartbeat and records and analyzes sound for listening to breathing.
  7. A multi-head screwdriver that can look at the screw you are going to use and the correct size head lights up.
  8. A tray that can measure the amount of food that you are getting to go and print a price tag. The tag can then be easily brought up to the cashier and paid for quickly.
  9. A coffee mug that tells you when your drink is cool enough to drink.
  10. Make passwords more secure by moving them from the keyboard to any chosen object where pressure sensor can sense a specific pattern to unlock the computer.
  11. Attach an arduino to a dog’s collar that the dog can be trained to interact with (barks, licks, breath, light) and open the door or turn on a water dispenser.
  12. A smart crib that can rock the crib when it senses too much noise, that alerts you when the baby does certain things, etc
  13. Mount to skateboard that gives you points based on spins, acceleration, jumps (real life Tony Hawk).
  14. Motivation for running – virtual reality chase game to keep you running while on treadmill and meet workout goal (think real life temple run).
  15. Hands-free way of interacting with your phone using kinect to detect gestures that correspond to mechanical motion on the phone’s touch screen and accelerometer.

II. Idea Choices:

Kinect-based application:
Through the brainstorming process, we tried to come up with ideas by looking at inefficiencies we saw around us and by considering problems those that we or our friends recently had. The idea we have chosen is to develop a mechanical, hands-free means to control one’s phone and we actually came up with it after discussing how one of Gabe’s friends recently dropped and broke his phone as he tried to pick up a call while on a treadmill. With our incessant dependence on mobile communication, we thought that there was definitely room for a hands free means to control a phone (outside of Siri, which is pretty terrible at recognizing a lot of commands). Our proposed solution uses a Kinect device set on the dashboard of the treadmill. Motions of the user would be used to control a mechanical mount in which the phone could be set. This mount will consist of a mechanical “finger” that can be used to touch different parts of the screen, and ideally, we will be able to move the entire mount in order to control accelerometer related functions of the phone. Through this hybrid, mechanical solution, we can translate our own full body actions to actions on the phone without actually touching the device. One could imagine waving to pick up a phone call or pretending to bob one’s head to music to start iTunes.

55. OnTheRun

55. OnTheRun

Our second best idea:
Our second idea came from realizing the limitations in existing password systems. Most are based on a string, comprised of basic, finite character sets. This puts users in the position of either memorizing a complicated password or risk being vulnerable to simple attacks. Users tend to opt for convenience and choose passwords that are susceptible even to simple, brute-force attacks. We imagine a system for “passwords” that is virtually infinite, by taking gestures as input. A glove, when hooked up to a computer, can sense the gesture of a user’s hand and a software program can memorize the sequence of gestures that the user creates and then check future inputs against it. Each gesture, or “character”, is a product of the user’s imagination and thus is much harder for a hacker to guess.

III. Project Description

Target User Group:
Our target user group for this project consists of those who, like Gabe’s friend, are very plugged into their electronic communication and media devices and want to use them while exercising. With cellphones becoming more and more advanced and commonplace, it is becoming necessary for many of us to interact with and respond to them on an immediate basis. At the same time, though, they are becoming increasingly expensive and fragile. As such, one of the needs of the target group is to ensure that their phones are safe and not in fear of falling and having a cracked screen. Young users especially, who are used to always being plugged in, also want to be able to perform simple tasks like taking calls, sending texts, and maybe changing the music playing while they are working out. A gesture based, hands free manner to interact with their devices is especially useful for these users because it is simple and would allow them perform a task without requiring the exact and careful motor skills that touching the screen does.

Problem Description and Context:
As stated earlier, we first thought of the problem when a friend of Gabe’s experienced it himself. Those who exercise, especially in the gym, often multitask while doing so, but risk getting distracted and damaging their phone or themselves. On treadmills in particular, users often need some external stimulation besides staring at the wall ahead. We want to design a solution that allows the user to interact with their phone in a safe, fun way. We believe that a major cause of difficulties with using phones on a treadmill is that phones have a relatively small interactive surface, which requires more attention to get right, especially while moving quickly. Our system would need to have simple interactions and a large interactive surface to resolve these issues. It would also need to function in some of the most commonly attempted activities while running, for example, talking on the phone and reading. The interface could then be safe enough for use while running, but also give the user the entertainment or productivity that they are looking for.

Technology platform:
We chose to use a hybrid platform of both Arduino and Kinect for our application. We felt that Kinect was the best form of detection for the touch-free interaction with a large interface and variety of simple interactions, which is key to the solution of the problem described above. Additionally, from lab, we have discovered that Arduino has sufficient means of recognizing analog input. We need to be able to process the signals detected by Kinect in some way; Arduino is an appropriate means of translating this into the mechanical interactions on a touch-screen.

Harlem Shake v436

Group Members

Osman Khwaja
Alejandro Van Zandt-Escobar
Gabriel Chen
Avneesh Sarwate
Prakhar Agarwal


We built a glass world that reacts to light using a photosensor and behaves according to the state it is in. There are three states governed by a button: the idle state, the build state, and the drop state. Before the button is enabled, the world is in a calibration state, used to expose the photoresistor to the range of possible light inputs and thus, resistances. The idle state consists of a tricolor LED, fitted with a straw. The tricolor LED oscillates between all ranges of colors according to three sin functions. The other LEDs do nothing. The build state is to be initiated by the press of the button when the song “Harlem Shake” is played (in light of the recent trend). The tricolor LED begins to change colors erratically, and the remaining LEDs alternate slowly between reds and blues, arranged diagonally from each other. The behavior matches the tempo of the song. The drop state is to be initiated at the beat drop of the song. The tricolor LED continues its erratic behavior, but the remaining LEDs now act based on the light sensor. This can be used to induce extremely erratic behavior all LEDs, in accordance with Harlem Shake tradition. Thus, we felt that our design successfully produced the desired behavior. The different states of the design are a good representation of different stages in the song, and the use of a button allows for ease of state transition. Additionally, the straw and ice cube trays were excellent diffusers, and really emphasized the output of the LEDs. One limitation of our design was the sensitivity of the photoresistor. It was placed under a thick layer of glass, which may have diffused light entering the circuit. Although this made the design more aesthetic, the functionality was slightly impaired. Overall, we were happy with the Harlem Shake video we were able to produce using our design, and we hope that it goes viral!

Photos of Sketches

Slide sensor controls the brightness of the lights. Lights closest to finger are brightest. Move finger to control the light.

Follow the finger: Slide sensor controls the brightness of the lights. Lights closest to finger are brightest. Move finger to control the light.


Perfect Pushup - Use a diffuser and flex sensor to determine whether pushup form is correct or not.

Perfect Pushup: Use a diffuser and flex sensor to determine whether pushup form is correct or not.


A schematic of our final design.

A schematic of our final design.


A design diagram of our project

A design diagram of our project.



  • Arduino Uno
  • Button
  • Photoelectric Sensor
  • Ice Cube Tray
  • Glass Box/Flower Vase
  • 1 Straw
  • Wires
  • 2 10k Ohm Resistor
  • 7 330 Ohm Resistors
  • 2 Blue LEDs
  • 2 Red LEDs
  • 1 Tricolor LED
  • 2 Alligator Clips
  • Tape


  1. Connect the TriColor LED to the three analog pins 11, 10, 9 through 330 Ohm resistors.
  2. Connect 4 LEDs in a general box shape just below the TriColor to the pins 7,6,5,4 with a 330 Ohm Resistor for each.
  3. Attach a photoelectric sensor to the top of the glass box using the alligator clips. Ensure that the sensor is facing outwards.
  4. Connect the button to the breadboard with the 10k Resistor, pulling 5 Volts from Arduino. Connect the output to pin 3.
  5. Connect the photosensor with a 10k Resistor to pin A0 on the Arduino.
  6. Cover the 4 LEDs with the ice cube tray, the tricolor with a straw, and all of them with the glass case.
  7. When powering up the system, make sure to calibrate the photosensor by covering and uncovering the sensor. The Blue LED will light up during this time.

    Here is what the final setup should look like.

    Here is what the final setup should look like.

Source Code

// ----------------------
// Harlem Shake v. 436
// ----------------------
// COS 436, Lab 0
// February 18, 2013
// ----------------------
// Prakhar Agarwal
// Gabriel Chen
// Osman Khwaja
// Avneesh Sarwate
// Alejandro Van Zandt-Escobar
// ----------------------
// The "beacon" (multicolor LED) is connected to three analog outputs
const int beaconRed = 11;
const int beaconGreen = 10;
const int beaconBlue = 9;
// The four other LEDs are connected to four digital outputs
const int ledYellow = 8;
const int ledRed = 7;
const int ledBlue = 6;
const int ledGreen = 5;

// Sensor 1: Photocell
const int sensorPin = A0;

int sensorValue = 0;
int sensorMin = 1023; // minimum sensor value
int sensorMax = 0; // maximum sensor value
int threshold = 127;

// Button
const int buttonPin = 3;

int buttonState = 0; // HIGH or LOW
int buttonCounter = 0; // Number of clicks determines the program's current state.
int lastButtonState = 0; // HIGH or LOW

// Setup Routine
void setup() {

// For debugging:

// Set up I/O.
pinMode(beaconRed, OUTPUT);
pinMode(beaconGreen, OUTPUT);
pinMode(beaconBlue, OUTPUT);

pinMode(ledGreen, OUTPUT);
pinMode(ledBlue, OUTPUT);
pinMode(ledRed, OUTPUT);
pinMode(ledYellow, OUTPUT);

pinMode(buttonPin, INPUT);

// Calibrate photocell during the first five seconds.
while (millis() < 5000) { // Light up LED at the beginning of calibration phase. digitalWrite(ledBlue, HIGH); // Read in value from photocell sensorValue = analogRead(sensorPin); // Record the maximum sensor value if (sensorValue > sensorMax) {
sensorMax = sensorValue;

// Record the minimum sensor value
if (sensorValue < sensorMin) {
sensorMin = sensorValue;

// Turn off LED at end of calibration phase
digitalWrite(ledBlue, LOW);



// Variables for timing and rhythm
double time = 0;
double t = 0; // Used for sin wave patterns
int beat = 430; // Duration of a beat (in ms)
int downBeatBeacon;
int downBeatCubes;

void loop() {

// *** Process Photocell Input ***
// Read photocell sensor
sensorValue = analogRead(sensorPin);
// Apply calibration
sensorValue = map(sensorValue, sensorMin, sensorMax, 0, 255);
// Map sensor value to desired range
sensorValue = constrain(sensorValue, 0, 255);

// *** Process Button Input ***
// Read state of pushbotton
buttonState = digitalRead(buttonPin);
// Compare the buttonState to its previous state
if (buttonState != lastButtonState) {
// State changes when button is pressed down (from off to on)
// If state has changed then increment counter
if (buttonState == HIGH) {
// If the current state is HIGH then button went from off to on
if (buttonCounter == 2)
buttonCounter = 0;
// For debugging:
// Serial.println("on");
// Serial.print("number of button pushes: ");
// Serial.println(buttonCounter);
else {
// If the current state is LOW then the button went from on to off
// save the current state as the last state, for next time through the loop
lastButtonState = buttonState;

// *** Main Program Loop ***

// *** Idle State ***
if (buttonCounter == 0) {
// Tri-color LED has an intersecting sinusoidal pattern
analogWrite(beaconRed, (int) (127 + 127 * sin(t)));
analogWrite(beaconBlue, (int) (127 + 127 * sin(t + 3.14/3)));
analogWrite(beaconGreen, (int) (127 + 127 * sin(t + 6.28/3)));

// Turn all other LEDs off
digitalWrite(ledBlue, LOW);
digitalWrite(ledGreen, LOW);
digitalWrite(ledRed, LOW);
digitalWrite(ledYellow, LOW);

// Progression of sinusoidal pattern
t += 0.1;

// *** Build State ***
else if (buttonCounter == 1) {
// Beacon's activity is determined by eighth notes
downBeatBeacon = ((int) (time / (beat / 2)));
// Cube's activity is determined by half notes
downBeatCubes = ((int) (time / (beat * 2))) % 2;

// The beacon plays an accelerated sinusoiodal pattern
// Erratically matched to the rhythm of eighth notes
analogWrite(beaconRed, (int) (127 + 127 * sin(downBeatBeacon + .9)));
analogWrite(beaconBlue, (int) (127 + 127 * sin(9 * downBeatBeacon + .2)));
analogWrite(beaconGreen, (int) (127 + 127 * sin(7 *downBeatBeacon)));

// The four LEDs in the icecube alternate diagonally, on every half beat.
// On beat 1:
if (downBeatCubes == 0) {
digitalWrite(ledBlue, HIGH);
digitalWrite(ledGreen, LOW);
digitalWrite(ledRed, LOW);
digitalWrite(ledYellow, HIGH);
// On beat 2:
else if (downBeatCubes == 1) {
digitalWrite(ledBlue, LOW);
digitalWrite(ledGreen, HIGH);
digitalWrite(ledRed, HIGH);
digitalWrite(ledYellow, LOW);

// Update every eighth note
delay(beat / 2);
time += beat / 2;


// *** Drop State ***
else {
// Beacon's activity is determined by eighth notes
downBeatBeacon = ((int) (time / (beat / 2)));

// The beacon plays an accelerated sinusoiodal pattern
// Erratically matched to the rhythm of eighth notes
analogWrite(beaconRed, (int) (127 + 127 * sin(downBeatBeacon + .9))); // turn the LED on (HIGH is the voltage level)
analogWrite(beaconBlue, (int) (127 + 127 * sin(9 * downBeatBeacon + .2))); // turn the LED on (HIGH is the voltage level)
analogWrite(beaconGreen, (int) (127 + 127 * sin(7 *downBeatBeacon)));

// The cube LEDs play the same pattern, but switch according
// to input from the photocell.
if (sensorValue < threshold) {
digitalWrite(ledBlue, HIGH);
digitalWrite(ledGreen, LOW);
digitalWrite(ledRed, LOW);
digitalWrite(ledYellow, HIGH);
else {
digitalWrite(ledBlue, LOW);
digitalWrite(ledGreen, HIGH);
digitalWrite(ledRed, HIGH);
digitalWrite(ledYellow, LOW);

// Update every eighth note
delay(beat / 2);
time += beat / 2;