GROVE - RGB LED サンプルプログラム

Dependencies:   Chainable_RGB_LED mbed

Committer:
jksoft
Date:
Sat Nov 30 02:26:50 2013 +0000
Revision:
0:1a201edebc5c
Rev1

Who changed what in which revision?

UserRevisionLine numberNew contents of line
jksoft 0:1a201edebc5c 1 #include "mbed.h"
jksoft 0:1a201edebc5c 2 #include "ChainableLED.h"
jksoft 0:1a201edebc5c 3
jksoft 0:1a201edebc5c 4 ChainableLED rgbled(p5,p6,1); // clk data num
jksoft 0:1a201edebc5c 5
jksoft 0:1a201edebc5c 6 int main() {
jksoft 0:1a201edebc5c 7 while(1) {
jksoft 0:1a201edebc5c 8 rgbled.setColorRGB(0,255,0,0); // RED
jksoft 0:1a201edebc5c 9 wait(0.5);
jksoft 0:1a201edebc5c 10 rgbled.setColorRGB(0,0,255,0); // GREEN
jksoft 0:1a201edebc5c 11 wait(0.5);
jksoft 0:1a201edebc5c 12 rgbled.setColorRGB(0,0,0,255); // BLUE
jksoft 0:1a201edebc5c 13 wait(0.5);
jksoft 0:1a201edebc5c 14 }
jksoft 0:1a201edebc5c 15 }