Oppgave 6.1
Dependencies: mbed
Revision 0:1dc7ec39a877, committed 2017-10-03
- Comitter:
- Smashftw
- Date:
- Tue Oct 03 12:42:16 2017 +0000
- Commit message:
- Oppgave61
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 Tue Oct 03 12:42:16 2017 +0000 @@ -0,0 +1,23 @@ +#include "mbed.h" + +BusOut ledNS (p7, p6, p5); // Grønn, Gul, Rød +BusOut ledOV (p10, p9, p8); // Grønn, Gul, Rød +int lysNS[8] = {1, 1, 1, 3, 4, 2, 1, 1}; +int lysOV[8] = {4, 2, 1, 1, 1, 1 ,1, 3}; +int ventetid[8] = {5000, 2000, 1000, 500, 5000, 2000, 1000, 500}; +int main() +{ + while(1) { + + + for (int i=0; i<8; i++) { + + ledNS = lysNS[i]; + ledOV = lysOV[i]; + wait_ms (ventetid[i]); + + } + + } +} +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Tue Oct 03 12:42:16 2017 +0000 @@ -0,0 +1,1 @@ +https://mbed.org/users/mbed_official/code/mbed/builds/235179ab3f27 \ No newline at end of file