Matthew Pybus
/
Master
Revision 0:fb3382f64def, committed 2013-05-03
- Comitter:
- MPybus
- Date:
- Fri May 03 09:01:34 2013 +0000
- Commit message:
- master board, productivity calculation
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
--- /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); + + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Fri May 03 09:01:34 2013 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/7e6c9f46b3bd \ No newline at end of file