Project showcase
Meeting Cost Counter

Meeting Cost Counter © MIT

See what meetings really cost.

  • 1,895 views
  • 1 comment
  • 8 respects

Components and supplies

About this project

I had this idea to see what meetings really cost. It came to me when we were integrating a new timeclock system at work. Since the time clock has your hourly pay rate why not have one where you punch in at every meeting and a debt counter starts counting up at the rate your being paid for being there. As each attendee punches the Debt speeds up and shows the real dollars and cents cost of the meeting.

Kind of a real time debt clock.

I happened to mention this one week over lunch and my friend Joe gave me the idea to make it less personal. Using a published salary rate for our job. I'll leave it to you to find your own average base salary for your clock.

We just got some LCD RGB Shields from Adafruit and they had to be assembled and tested so i so I grabbed one and an Arduino Uno and loaded the example sketch. After testing all the functions of the shield I wrote a simple loop. I only used three buttons. in, out, and clear. the clear button is just the Arduino reset button. I added another button to shift the background color of the display.

Step 1: Actual Use

Just hit the Check in button for each person as they walk in the door. Then check them out as they leave. the display will show the running cost of the meeting, the current number of attendees and the total running time of this meeting.

I want to add an external display on the serial port using some big 7 segment displays I had.But that's after I completely redo the sketch. I want a setup menu and a better way of tallying up the cost.

Step 2: Code

The sketch is not pretty. I threw it together in less than a half hour. More of a proof of concept than a completed project. I want to use the timer to update the cost. Right now it's just a loop calibrated by trial and error. It works well for what it is.

If it goes over $1000 you lose the seconds display and if it runs for more than 24 hours it will say "you've got to be kidding me". I probably should have added a backlight red command to that last if statement..

Code

Meeting Debt ClockArduino
/*********************
  Meeting Debt Clock
**********************/

#include <Wire.h>
#include <Adafruit_MCP23017.h>
#include <Adafruit_RGBLCDShield.h>

Adafruit_RGBLCDShield lcd = Adafruit_RGBLCDShield();

#define RED 0x1
#define YELLOW 0x3
#define GREEN 0x2
#define TEAL 0x6
#define BLUE 0x4
#define VIOLET 0x5
#define WHITE 0x7
int color = 7 ;
 
long day = 86400000;
long hour = 3600000; 
long minute = 60000; 
long second =  1000; 
int days = 86400000;
int hours = 3600000; 
int minutes = 60000; 
int seconds =  1000; 

long time = 0;
long start = 0;
float salary = 0.00065 ;
int att = 0 ;
float cost = 0;
int tmr = 0 ;

void setup() {
  Serial.begin(9600);
  lcd.begin(16, 2);
  lcd.print("Meeting Debt Clk");
  lcd.setCursor(0, 1);
  lcd.print("  Version 0.25 ");
  lcd.setBacklight(TEAL);
}

uint8_t i=0;

void loop() {

  if (att){
    if (tmr > 25) {
      tmr = 0 ;
      cost = cost +  (salary * att) ;
      display();
    } else {
     tmr = tmr + 1 ;
    } 
  }
  uint8_t buttons = lcd.readButtons();

  if (buttons) {
    if (buttons & BUTTON_SELECT) {
      color = color + 1 ;
      lcd.setBacklight(color);
      cost = cost +  (salary * att * 10) ;
      delay (400);
    }
    if (buttons & BUTTON_LEFT) {
      if (att > 0 ){
        att = att - 1 ;
        cost = cost +  (salary * att * 10) ;
        display();
        delay (400);
      }
    }
    if (buttons & BUTTON_RIGHT) {
      if (att == 0) {
        start = millis();
        cost = 0 ;
        lcd.clear();
      }
      att = att + 1 ;
      cost = cost +  (salary * att * 10) ;
      display();
      delay (400);
    }
  }
}

void display() {
      time = (millis() - start) ;
      days = time / day ;                                
      hours = (time % day) / hour;                       
      minutes = ((time % day) % hour) / minute ;         
      seconds = (((time % day) % hour) % minute) / second;
      
      if (days) {
        lcd.setCursor(0, 0);
        lcd.print("You`ve Got To Be");
        lcd.setCursor(0, 1);
        lcd.print("  Kidding Me !  ");
      } else {
        lcd.setCursor(0, 0);
        lcd.print("$");
        lcd.print (cost);
        lcd.print (" ");
        if (hours < 10) {
          lcd.print ("0");
        }
        lcd.print (hours);
        lcd.print (":");
        if (minutes < 10) {
          lcd.print ("0");
        }
        lcd.print (minutes);
        if (cost < 1000){
          lcd.print (":");
          if (seconds < 10) {
            lcd.print ("0");
          }
            lcd.print (seconds);
        } else {
          lcd.print("   ");
        }
        lcd.setCursor(0, 1);
        lcd.print(att);
        if (att == 1 ){
          lcd.print(" Attendee ");
        } else {
          lcd.print(" Attendees ");
      }
    }
 }

Comments

Similar projects you might like

Arduino Frequency Counter with 16×2 LCD Display

Project in progress by jasir

  • 19,103 views
  • 6 comments
  • 17 respects

Stopwatch and Lap Time Counter

Project showcase by LAGSILVA

  • 13,915 views
  • 5 comments
  • 24 respects

Counter

Project tutorial by

  • 4,677 views
  • 2 comments
  • 6 respects

Fidget Spinner RPM Counter

by Andriy Baranov

  • 38,707 views
  • 29 comments
  • 101 respects

Automatic Arduino Goal Counter for Table Football/Soccer

Project showcase by OSZ Täuffelen

  • 2,555 views
  • 1 comment
  • 4 respects

Copy Of Fidget Spinner RPM Counter

Project in progress by CK Tan

  • 2,402 views
  • 1 comment
  • 5 respects
Add projectSign up / Login