Blinking LED

Dependencies:   mbed

Committer:
toyoshima
Date:
Sun Mar 13 02:22:32 2016 +0000
Revision:
0:be8b919908e7
LED(??)?????0.5????

Who changed what in which revision?

UserRevisionLine numberNew contents of line
toyoshima 0:be8b919908e7 1 #include "mbed.h"
toyoshima 0:be8b919908e7 2
toyoshima 0:be8b919908e7 3 DigitalOut LED_R(LED1);
toyoshima 0:be8b919908e7 4 DigitalOut LED_G(LED2);
toyoshima 0:be8b919908e7 5 DigitalOut LED_B(LED3);
toyoshima 0:be8b919908e7 6
toyoshima 0:be8b919908e7 7 int main() {
toyoshima 0:be8b919908e7 8 while(1) {
toyoshima 0:be8b919908e7 9 LED_R = 1;
toyoshima 0:be8b919908e7 10 LED_G = 1;
toyoshima 0:be8b919908e7 11 LED_B = 1;
toyoshima 0:be8b919908e7 12 wait(0.5);
toyoshima 0:be8b919908e7 13 LED_R = 0;
toyoshima 0:be8b919908e7 14 LED_G = 0;
toyoshima 0:be8b919908e7 15 LED_B = 0;
toyoshima 0:be8b919908e7 16 wait(0.5);
toyoshima 0:be8b919908e7 17 }
toyoshima 0:be8b919908e7 18 }