Blinky program for Lizzy HW.

Committer:
jurica238814
Date:
Mon Apr 23 08:23:08 2018 +0000
Revision:
0:6603328e7c5b
Init commit.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
jurica238814 0:6603328e7c5b 1 /*
jurica238814 0:6603328e7c5b 2 *
jurica238814 0:6603328e7c5b 3 */
jurica238814 0:6603328e7c5b 4
jurica238814 0:6603328e7c5b 5 #include "mbed.h"
jurica238814 0:6603328e7c5b 6
jurica238814 0:6603328e7c5b 7 #define RED (p31)
jurica238814 0:6603328e7c5b 8 #define GREEN (p2)
jurica238814 0:6603328e7c5b 9 #define BLUE (p3)
jurica238814 0:6603328e7c5b 10 #define DELAY_MS (1000)
jurica238814 0:6603328e7c5b 11
jurica238814 0:6603328e7c5b 12 DigitalOut red(RED);
jurica238814 0:6603328e7c5b 13 DigitalOut green(GREEN);
jurica238814 0:6603328e7c5b 14 DigitalOut blue(BLUE);
jurica238814 0:6603328e7c5b 15
jurica238814 0:6603328e7c5b 16
jurica238814 0:6603328e7c5b 17 int main()
jurica238814 0:6603328e7c5b 18 {
jurica238814 0:6603328e7c5b 19 while(1)
jurica238814 0:6603328e7c5b 20 {
jurica238814 0:6603328e7c5b 21 red = 1;
jurica238814 0:6603328e7c5b 22 green = 1;
jurica238814 0:6603328e7c5b 23 blue = 1;
jurica238814 0:6603328e7c5b 24 wait_ms(DELAY_MS);
jurica238814 0:6603328e7c5b 25 red = 0;
jurica238814 0:6603328e7c5b 26 green = 0;
jurica238814 0:6603328e7c5b 27 blue = 0;
jurica238814 0:6603328e7c5b 28 wait_ms(DELAY_MS);
jurica238814 0:6603328e7c5b 29 }
jurica238814 0:6603328e7c5b 30 }
jurica238814 0:6603328e7c5b 31