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:e2ffc65371db, committed 2018-09-26
- Comitter:
- aldomarez
- Date:
- Wed Sep 26 18:43:55 2018 +0000
- Commit message:
- Sumador
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 |
diff -r 000000000000 -r e2ffc65371db main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Wed Sep 26 18:43:55 2018 +0000 @@ -0,0 +1,36 @@ +#include "mbed.h" +#include <stdint.h> +BusIn A(PB_13,PC_4,PA_10,PB_3); +BusIn B(D4,D5,D6,D7); +BusOut Sal(D8,D9,D10,D11,D12,D13,D14,D15); +DigitalIn ent1(PA_12),ent2(PA_11),ent3(PB_12),ent4(PB_2); + +int main() { + int a,b,s; + while (true) { + a=A; + b=B; + if(ent1==1){ + s=a+b; + } + else if(ent2==1){ + if (a>b){ + s=a-b;} + else{ + s=b-a;} + } + else if(ent3==1){ + s=a*b; + } + else if(ent4==1){ + if (a>b){ + s=a/b;} + else{ + s=b/a;} + } + else{ + s=b; + } + Sal=s; + } +} \ No newline at end of file
diff -r 000000000000 -r e2ffc65371db mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Wed Sep 26 18:43:55 2018 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/a7c7b631e539 \ No newline at end of file