Procrastination Meter

Procrastination.. everyone knows it’s bad but still do it at some point.

For me it helps when I realized how much time I drifted off, so I wanted to build a procrastination-meter to be a reminder of guilt and do even more work.

It can be attached on to the wall around your workspace. At first it may seem like a blank picture frame, but once you start procrastinating the time will start to count and for every hour one LED would appear (5 secs for the demo). As the LEDs are hidden behind the black tissue paper, it is not possible to tell what image it is. It will slowly reveal itself as you procrastinate. It also acts as a dynamic decorative item in your space.

The physical form and wiring is not complicated. The coding was tricky for me as this is my first time with Arduino.

I got the basic code from “Getting started with Arduino” book on how to make the LEDs light up in timed intervals and on the Arduino forum on how to control multiple LEDs with one button: http://arduino.cc/forum/index.php?topic=124707.0

Here is the code.. (Thanks to Nick and Ruzette for their help!) I have to admit as of now it works fine up until after it paused and has to start counting again. It will just have to be start over for now.

——————————————————————————————————————————–

int LED1Pin = 13;   // define 1st LED
int LED2Pin = 12;  // define 2nd LED
int LED3Pin = 11;  // define 3rd LED
int LED4Pin = 10;  // define 4th LED
int LED5Pin = 9;  // define 5th LED
int LED6Pin = 8;  // define 6th LED
int LED7Pin = 6;  // define 7th LED
int LED8Pin = 5;  // define 8th LED
int LED9Pin = 4;  // define 9th LED
int LED10Pin = 3;  // define 10th LED

int BUTTON = 7;  // the input pin where the
// pushbutton is connected
int val = 0;     // val will be used to store the state
// of the input pin

int currentstate = 0;   // 0 = LED off and 1 = LED on and 2 = pause

long lastChange = 0;

unsigned long startTime = 0;

void setup() {
pinMode(LED1Pin, OUTPUT);   // tell Arduino LED is an output
pinMode(LED2Pin, OUTPUT);
pinMode(LED3Pin, OUTPUT);
pinMode(LED4Pin, OUTPUT);
pinMode(LED5Pin, OUTPUT);
pinMode(LED6Pin, OUTPUT);
pinMode(LED7Pin, OUTPUT);
pinMode(LED8Pin, OUTPUT);
pinMode(LED9Pin, OUTPUT);
pinMode(LED10Pin, OUTPUT);
pinMode(BUTTON, INPUT); // and BUTTON is an input

Serial.begin(9600);
}
void loop(){
val = digitalRead(BUTTON); // read input value and store it
long counttime = millis() – lastChange;
Serial.print(“Current val is : “);
Serial.println(counttime);

// check if button is pushed and if in off state
if ((val == HIGH) && (currentstate == 0)){
currentstate = 1;
lastChange = millis();
}
else if ((val == HIGH) && (currentstate == 1)){
currentstate = 2;
}
else if ((val== HIGH) && (currentstate == 2)){
currentstate = 1;
lastChange = millis() – lastChange;
}

if ((currentstate == 1) && (millis() – lastChange) >= 5000) {
digitalWrite(LED4Pin, HIGH); // turn LED ON

}
if ((currentstate == 1) && (millis() – lastChange) >= 10000) {
digitalWrite(LED1Pin, HIGH); // turn LED ON

}
if ((currentstate == 1) && (millis() – lastChange) >= 15000) {
digitalWrite(LED10Pin, HIGH); // turn LED ON

}

if ((currentstate == 1) && (millis() – lastChange) >= 20000) {
digitalWrite(LED2Pin, HIGH); // turn LED ON

}
if ((currentstate == 1) && (millis() – lastChange) >= 25000) {
digitalWrite(LED5Pin, HIGH); // turn LED ON

}
if ((currentstate == 1) && (millis() – lastChange) >= 30000) {
digitalWrite(LED9Pin, HIGH); // turn LED ON

}

if ((currentstate == 1) && (millis() – lastChange) >= 35000) {
digitalWrite(LED7Pin, HIGH); // turn LED ON

}

if ((currentstate == 1) && (millis() – lastChange) >= 40000) {
digitalWrite(LED3Pin, HIGH); // turn LED ON

}

if ((currentstate == 1) && (millis() – lastChange) >= 45000) {
digitalWrite(LED6Pin, HIGH); // turn LED ON

}

if ((currentstate == 1) && (millis() – lastChange) >= 50000) {
digitalWrite(LED8Pin, HIGH); // turn LED ON

}
}
——————————————————————————————————————————–

In the future, the input of logging on Facebook or other procrastination websites, can be sent directly to system.

It can be in the living space and be a display piece. That’s also one of the main ideas behind, the irony that you are procrastinating but at the same time actually generating something. A display of you procrastination.

Comments are closed.