Oppgave 5.1c original

Dependencies:   mbed

Fork of Oppgave51c by Sølibatgutt

Committer:
Smashftw
Date:
Tue Oct 03 10:46:10 2017 +0000
Revision:
1:bffc32827968
Parent:
0:577d9598d207
Oppgave51c

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Smashftw 0:577d9598d207 1 #include "mbed.h"
Smashftw 0:577d9598d207 2
Smashftw 0:577d9598d207 3 DigitalOut myled(LED1);
Smashftw 1:bffc32827968 4 void blink2 (float Tp, float Ta);
Smashftw 1:bffc32827968 5
Smashftw 1:bffc32827968 6 int main()
Smashftw 1:bffc32827968 7 {
Smashftw 1:bffc32827968 8 int n = 75;
Smashftw 1:bffc32827968 9 while(n>0) {
Smashftw 1:bffc32827968 10
Smashftw 0:577d9598d207 11 blink2(0.133, 0.067);
Smashftw 0:577d9598d207 12 n--;
Smashftw 1:bffc32827968 13 }
Smashftw 1:bffc32827968 14 return 0;
Smashftw 0:577d9598d207 15 }
Smashftw 1:bffc32827968 16
Smashftw 1:bffc32827968 17 void blink2(float Tp, float Ta)
Smashftw 1:bffc32827968 18 {
Smashftw 0:577d9598d207 19 myled=1;
Smashftw 0:577d9598d207 20 wait(Tp);
Smashftw 0:577d9598d207 21 myled=0;
Smashftw 0:577d9598d207 22 wait(Ta);
Smashftw 1:bffc32827968 23 }