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.
Revision 0:7681b3a2e015, committed 2015-07-20
- Comitter:
- AnjaniVasavi
- Date:
- Mon Jul 20 10:29:26 2015 +0000
- Commit message:
- sensor program
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 Mon Jul 20 10:29:26 2015 +0000 @@ -0,0 +1,56 @@ +#include "mbed.h" + + +DigitalIn a(PTB1); +DigitalIn b(PTB0); +DigitalOut c(PTB8); +DigitalOut myled(LED1); + + +int main() +{ + myled=0; + int count=0; + while(1) + { + // int count=0; + if(a==0) + { + count++; + if(count>=1) + { + c=1; + myled =0; + } + else + { + c=0; + myled =1; + } + + } + wait(2); + + if(b==0) + { + count--; + if(count>=1) + { + c=1; + myled =0; + } + else + { + c=0; + myled =1; + } + } + + } + } + + + + + +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Mon Jul 20 10:29:26 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/da0ca467f8b5 \ No newline at end of file