Jamie Bowen / Mbed 2 deprecated RGBLED_K64F_6COLOURS

Dependencies:   mbed

Fork of RGBLED by Steven Cheldelin

Committer:
bohocode
Date:
Thu Jan 29 08:42:26 2015 +0000
Revision:
1:a43483907ce0
Parent:
0:7c0b6a649748
Added yellow, cyan and magenta.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
rcflyair 0:7c0b6a649748 1 #include "mbed.h"
rcflyair 0:7c0b6a649748 2 #include "rgbled.h"
rcflyair 0:7c0b6a649748 3
rcflyair 0:7c0b6a649748 4 int main(void)
rcflyair 0:7c0b6a649748 5 {
rcflyair 0:7c0b6a649748 6 rgbled rgb(PTB22, PTE26, PTB21); // create rgb object with pin definitions for FRDM-K64F board
rcflyair 0:7c0b6a649748 7 rgb.active(false); // set led output to active low
rcflyair 0:7c0b6a649748 8 rgb.set(none); // set led output of all off
rcflyair 0:7c0b6a649748 9 while(1){
rcflyair 0:7c0b6a649748 10 rgb.set(red);
rcflyair 0:7c0b6a649748 11 wait(1);
bohocode 1:a43483907ce0 12 rgb.set(yellow);
bohocode 1:a43483907ce0 13 wait(1);
rcflyair 0:7c0b6a649748 14 rgb.set(green);
rcflyair 0:7c0b6a649748 15 wait(1);
bohocode 1:a43483907ce0 16 rgb.set(cyan);
bohocode 1:a43483907ce0 17 wait(1);
rcflyair 0:7c0b6a649748 18 rgb.set(blue);
rcflyair 0:7c0b6a649748 19 wait(1);
bohocode 1:a43483907ce0 20 rgb.set(magenta);
bohocode 1:a43483907ce0 21 wait(1);
rcflyair 0:7c0b6a649748 22 }
rcflyair 0:7c0b6a649748 23 }