Iván Santos
/
santos_ej1
Ejercicio1
Revision 0:da4f59bc5b3c, committed 2022-04-13
- Comitter:
- sedu_santos
- Date:
- Wed Apr 13 17:27:00 2022 +0000
- Commit message:
- a
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed-os.lib | Show annotated file Show diff for this revision Revisions of this file |
diff -r 000000000000 -r da4f59bc5b3c main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Wed Apr 13 17:27:00 2022 +0000 @@ -0,0 +1,24 @@ +#include "mbed.h" + +DigitalOut ledInterno(LED1); +BusOut led(D5,D6,D7); +int i; +int len = sizeof(led)/sizeof(led[0]); + +void ledsIteration() { + while(1) { + ledInterno = !ledInterno; + wait(0.2); + ledInterno = !ledInterno; + for(i=0;i<=len;i++) { + led[i] = !led[i]; + wait(0.2); + led[i] = !led[i]; + } + + } +} + +int main() { + ledsIteration(); +}
diff -r 000000000000 -r da4f59bc5b3c mbed-os.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed-os.lib Wed Apr 13 17:27:00 2022 +0000 @@ -0,0 +1,1 @@ +https://github.com/ARMmbed/mbed-os/#2eb06e76208588afc6cb7580a8dd64c5429a10ce