Dependencies:   mbed

Revision:
0:fb3382f64def
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri May 03 09:01:34 2013 +0000
@@ -0,0 +1,43 @@
+#include "mbed.h"
+
+//input of typingflag wired
+//input of distance sensor wireless
+//input from fob reader
+
+int typingtime=0;
+int sittingtime=0;
+int productivity=0;
+
+
+int main() {
+
+    while(1)
+    {   
+        
+        if(fobreader!=0x00)
+        {
+            productivity=0      //reset the productivity if a new fob is read.
+        }
+        
+        if(typingflag==0x01)
+        {
+            typingtime++;
+        }
+        
+        if(sittingflag==1)
+        {
+            sittingtime++;
+        }
+        
+      producitvity=sittingtime+7*typingtime;
+      
+         //have the LCD display the productivity.
+      
+      if(sittingtime>1200)
+        {
+          //have the LCD display "Take a break?"  
+        
+      wait(1);
+        
+    }
+}