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.
Dependencies: mbed
Revision 0:5d8f66f3b10e, committed 2016-11-10
- Comitter:
- Martic
- Date:
- Thu Nov 10 19:23:11 2016 +0000
- Commit message:
- vjezba 7
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 5d8f66f3b10e main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Thu Nov 10 19:23:11 2016 +0000 @@ -0,0 +1,105 @@ +// program code for Exercise 19 +#include "mbed.h" +DigitalOut A(p5); // segment A +DigitalOut B(p6); // segment B +DigitalOut C(p7); // segment C +DigitalOut D(p8); // segment D +DigitalOut E(p9); // segment E +DigitalOut F(p10); // segment F +DigitalOut G(p11); // segment G +DigitalOut DP(p12); // segment DP +int main() +{ + while (1) { // infinite loop + A=1; + B=1; + C=1; + D=1; + E=1; + F=1; + G=0; + DP=0; // set LEDs '0' + wait(0.5); + A=0; + B=1; + C=1; + D=0; + E=0; + F=0; + G=0; + DP=0; // set LEDs '1' + wait(0.5); + A=1; + B=1; + C=0; + D=1; + E=1; + F=0; + G=1; + DP=0; // set LEDs '2' + wait(0.5); + A=1; + B=1; + C=1; + D=1; + E=0; + F=0; + G=1; + DP=0; // set LEDs '3' + wait(0.5); + A=0; + B=1; + C=1; + D=0; + E=0; + F=1; + G=1; + DP=0; // set LEDs '4' + wait(0.5); + A=1; + B=0; + C=1; + D=1; + E=0; + F=1; + G=1; + DP=0; // set LEDs '5' + wait(0.5); + A=1; + B=0; + C=1; + D=1; + E=1; + F=1; + G=1; + DP=0; // set LEDs '6' + wait(0.5); + A=1; + B=1; + C=1; + D=0; + E=0; + F=0; + G=0; + DP=0; // set LEDs '7' + wait(0.5); + A=1; + B=1; + C=1; + D=1; + E=1; + F=1; + G=1; + DP=0; // set LEDs '8' + wait(0.5); + A=1; + B=1; + C=1; + D=1; + E=0; + F=1; + G=1; + DP=0; // set LEDs '9' + wait(0.5); + } +} \ No newline at end of file
diff -r 000000000000 -r 5d8f66f3b10e mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Thu Nov 10 19:23:11 2016 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/0ab6a29f35bf \ No newline at end of file