Oppgave 5.2a
Dependencies: mbed
Diff: main.cpp
- Revision:
- 0:d64f197db339
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Tue Oct 03 10:58:55 2017 +0000 @@ -0,0 +1,20 @@ +#include "mbed.h" + +DigitalOut myled(LED1); +void blink4(int Tp, int Ta, int antall); + + +int main() +{ + blink4(500,500,10); + return 0; +} +void blink4(int Tp, int Ta, int antall) +{ + for (int i=0; i<antall; i++) { + myled=1; + wait_ms(Tp); + myled=0; + wait_ms(Ta); + } +} \ No newline at end of file