Maedeh Mousavi Haris Šemić

Dependencies:   mbed

Fork of LV1_Grupa6_Tim004 by tim004 tim004

Committer:
tim004
Date:
Thu Mar 06 16:00:52 2014 +0000
Revision:
1:443c6585901b
Parent:
0:4da8338a4685
LV1 - PAI - Grupa 6 - Tim004

Who changed what in which revision?

UserRevisionLine numberNew contents of line
tim004 0:4da8338a4685 1 #include "mbed.h"
tim004 1:443c6585901b 2 DigitalOut myled(LED3);
tim004 0:4da8338a4685 3
tim004 0:4da8338a4685 4 int main(){
tim004 1:443c6585901b 5 float i = 1, j=1;
tim004 1:443c6585901b 6 while(1)
tim004 1:443c6585901b 7 {
tim004 1:443c6585901b 8 while (i<=1.9 && j>= 0.1)
tim004 1:443c6585901b 9 {
tim004 1:443c6585901b 10 myled = 0 ;
tim004 1:443c6585901b 11 wait(i);
tim004 1:443c6585901b 12 myled = 1 ;
tim004 1:443c6585901b 13 wait(j) ;
tim004 1:443c6585901b 14 i+=0.06;
tim004 1:443c6585901b 15 j-=0.06;
tim004 1:443c6585901b 16 }
tim004 1:443c6585901b 17
tim004 1:443c6585901b 18 while (i>=0.1 && j<= 1.9)
tim004 1:443c6585901b 19 {
tim004 1:443c6585901b 20 myled = 0 ;
tim004 1:443c6585901b 21 wait(i);
tim004 1:443c6585901b 22 myled = 1 ;
tim004 1:443c6585901b 23 wait(j) ;
tim004 1:443c6585901b 24 i-=0.06;
tim004 1:443c6585901b 25 j+=0.06;
tim004 1:443c6585901b 26 }
tim004 0:4da8338a4685 27 }
tim004 0:4da8338a4685 28 }