A busy wait blinky implementation.

Committer:
sarahmarshy
Date:
Mon Sep 26 16:11:24 2016 +0000
Revision:
0:115f10501f59
Initial commit. Busy wait blinky.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
sarahmarshy 0:115f10501f59 1 #include "mbed.h"
sarahmarshy 0:115f10501f59 2
sarahmarshy 0:115f10501f59 3 DigitalOut myled(LED1);
sarahmarshy 0:115f10501f59 4
sarahmarshy 0:115f10501f59 5 int main() {
sarahmarshy 0:115f10501f59 6 while(1) {
sarahmarshy 0:115f10501f59 7 myled = 1;
sarahmarshy 0:115f10501f59 8 // printf("LED On\r\n");
sarahmarshy 0:115f10501f59 9 wait(0.2);
sarahmarshy 0:115f10501f59 10 myled = 0;
sarahmarshy 0:115f10501f59 11 // printf("LED Off \r\n");
sarahmarshy 0:115f10501f59 12 wait(0.2);
sarahmarshy 0:115f10501f59 13 }
sarahmarshy 0:115f10501f59 14 }