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.
main.cpp
00001 #include "mbed.h" 00002 00003 //input of typingflag wired 00004 //input of distance sensor wireless 00005 //input from fob reader 00006 00007 int typingtime=0; 00008 int sittingtime=0; 00009 int productivity=0; 00010 00011 00012 int main() { 00013 00014 while(1) 00015 { 00016 00017 if(fobreader!=0x00) 00018 { 00019 productivity=0 //reset the productivity if a new fob is read. 00020 } 00021 00022 if(typingflag==0x01) 00023 { 00024 typingtime++; 00025 } 00026 00027 if(sittingflag==1) 00028 { 00029 sittingtime++; 00030 } 00031 00032 producitvity=sittingtime+7*typingtime; 00033 00034 //have the LCD display the productivity. 00035 00036 if(sittingtime>1200) 00037 { 00038 //have the LCD display "Take a break?" 00039 00040 wait(1); 00041 00042 } 00043 }
Generated on Fri Jul 15 2022 21:57:50 by
1.7.2