17.11.2016.

Dependencies:   mbed

Committer:
kgrdosic
Date:
Thu Nov 17 18:00:46 2016 +0000
Revision:
0:619d62ea3daf
LED_efekt

Who changed what in which revision?

UserRevisionLine numberNew contents of line
kgrdosic 0:619d62ea3daf 1 #include "mbed.h"
kgrdosic 0:619d62ea3daf 2 DigitalOut led1(LED1);
kgrdosic 0:619d62ea3daf 3 DigitalOut led2(LED2);
kgrdosic 0:619d62ea3daf 4 DigitalOut led3(LED3);
kgrdosic 0:619d62ea3daf 5 DigitalOut led4(LED4);
kgrdosic 0:619d62ea3daf 6 int main()
kgrdosic 0:619d62ea3daf 7 {
kgrdosic 0:619d62ea3daf 8 while(1) {
kgrdosic 0:619d62ea3daf 9 led1 = 1;
kgrdosic 0:619d62ea3daf 10 led2 = 0;
kgrdosic 0:619d62ea3daf 11 led3 = 0;
kgrdosic 0:619d62ea3daf 12 led4 = 0;
kgrdosic 0:619d62ea3daf 13 wait(0.25);
kgrdosic 0:619d62ea3daf 14 led1 = 0;
kgrdosic 0:619d62ea3daf 15 led2 = 1;
kgrdosic 0:619d62ea3daf 16 led3 = 0;
kgrdosic 0:619d62ea3daf 17 led4 = 0;
kgrdosic 0:619d62ea3daf 18 wait(0.25);
kgrdosic 0:619d62ea3daf 19 led1 = 0;
kgrdosic 0:619d62ea3daf 20 led2 = 0;
kgrdosic 0:619d62ea3daf 21 led3 = 1;
kgrdosic 0:619d62ea3daf 22 led4 = 0;
kgrdosic 0:619d62ea3daf 23 wait(0.25);
kgrdosic 0:619d62ea3daf 24 led1 = 0;
kgrdosic 0:619d62ea3daf 25 led2 = 0;
kgrdosic 0:619d62ea3daf 26 led3 = 0;
kgrdosic 0:619d62ea3daf 27 led4 = 1;
kgrdosic 0:619d62ea3daf 28 wait(0.25);
kgrdosic 0:619d62ea3daf 29 led1 = 0;
kgrdosic 0:619d62ea3daf 30 led2 = 0;
kgrdosic 0:619d62ea3daf 31 led3 = 1;
kgrdosic 0:619d62ea3daf 32 led4 = 0;
kgrdosic 0:619d62ea3daf 33 wait(0.25);
kgrdosic 0:619d62ea3daf 34 led1 = 0;
kgrdosic 0:619d62ea3daf 35 led2 = 1;
kgrdosic 0:619d62ea3daf 36 led3 = 0;
kgrdosic 0:619d62ea3daf 37 led4 = 0;
kgrdosic 0:619d62ea3daf 38 wait(0.25);
kgrdosic 0:619d62ea3daf 39 }
kgrdosic 0:619d62ea3daf 40 }