Oppgave 5.2b
Dependencies: mbed
main.cpp
- Committer:
- Smashftw
- Date:
- 2017-10-03
- Revision:
- 0:b705d77ebf7c
File content as of revision 0:b705d77ebf7c:
#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); } }