Maedeh Mousavi Haris Šemić

Dependencies:   mbed

Fork of LV1_Grupa6_Tim004 by tim004 tim004

main.cpp

Committer:
tim004
Date:
2014-03-06
Revision:
1:443c6585901b
Parent:
0:4da8338a4685

File content as of revision 1:443c6585901b:

#include "mbed.h"
DigitalOut myled(LED3);

int main(){
float i = 1, j=1;
while(1)
{ 
    while (i<=1.9 && j>= 0.1)
    {
        myled = 0 ;
        wait(i);
        myled = 1 ;
        wait(j) ;
        i+=0.06;
        j-=0.06;
    }
    
    while (i>=0.1 && j<= 1.9)
    {
        myled = 0 ;
        wait(i);
        myled = 1 ;
        wait(j) ;
        i-=0.06;
        j+=0.06;
    }
}
}