Oppgave 5.2b
Dependencies: mbed
Revision 0:b705d77ebf7c, committed 2017-10-03
- Comitter:
- Smashftw
- Date:
- Tue Oct 03 11:09:32 2017 +0000
- Commit message:
- Oppgave52b
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 11:09:32 2017 +0000 @@ -0,0 +1,23 @@ +#include "mbed.h" + +DigitalOut myled(LED1), led2(LED4); +void blink5(int Tp, int Ta, int antall, DigitalOut &rLed); + + +int main() +{ + blink5(500,500,4, myled); + blink5(250,250,10,led2); + return 0; +} +void blink5(int Tp, int Ta, int antall, DigitalOut &rLed) +{ + for (int i=0; i<antall; i++) { + rLed=1; + wait_ms(Tp); + rLed=0; + wait_ms(Ta); + } + + +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Tue Oct 03 11:09:32 2017 +0000 @@ -0,0 +1,1 @@ +https://mbed.org/users/mbed_official/code/mbed/builds/235179ab3f27 \ No newline at end of file