Muris Nuhodžić Hamdija Sinanović

Dependencies:   mbed

Committer:
tim010
Date:
Thu Mar 06 16:39:04 2014 +0000
Revision:
0:e644a6fec797
Muris Nuhod?i?; Hamdija Sinanovi?

Who changed what in which revision?

UserRevisionLine numberNew contents of line
tim010 0:e644a6fec797 1 #include "mbed.h"
tim010 0:e644a6fec797 2
tim010 0:e644a6fec797 3
tim010 0:e644a6fec797 4 DigitalOut myled(LED1);
tim010 0:e644a6fec797 5
tim010 0:e644a6fec797 6 int main() {
tim010 0:e644a6fec797 7 float x = 0.005;
tim010 0:e644a6fec797 8 int znak = 1;
tim010 0:e644a6fec797 9 while(1) {
tim010 0:e644a6fec797 10 myled = 0;
tim010 0:e644a6fec797 11 wait(x);
tim010 0:e644a6fec797 12 myled = 1;
tim010 0:e644a6fec797 13 wait(0.01-x);
tim010 0:e644a6fec797 14 if((x <= 0.0001) || (x >= 0.0099)) znak *= -1;
tim010 0:e644a6fec797 15 x += znak*(0.0049/199);
tim010 0:e644a6fec797 16 }
tim010 0:e644a6fec797 17 }