Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: main.cpp
- Revision:
- 0:fb3382f64def
diff -r 000000000000 -r fb3382f64def main.cpp
--- /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);
+
+ }
+}