FRDM-KL25z simple tutorial example of controlling the RGB LED to flash different colors, and sending status messages to the host via the pc serial connection. Includes extensive explanatory comments.

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
cweems
Date:
Fri Jul 19 02:16:18 2013 +0000
Parent:
1:c07d099d8e31
Commit message:
Another minor edit

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Fri Jul 19 02:15:42 2013 +0000
+++ b/main.cpp	Fri Jul 19 02:16:18 2013 +0000
@@ -35,7 +35,7 @@
 
 int main() {
     pc.baud (9600);                       // Set the baud rate for the serial connection
-    redLED = 1;                           // This a common anode RGB LED, with the cathodes connected
+    redLED = 1;                           // This a common anode RGB LED, with the anodes connected
     greenLED = 1;                         // to 1. Thus, to turn a color off you counterintuitively set
     blueLED = 1;                          // it to 1, so there is no voltage difference across the LED
     for (int i = 1; i <= 5; i++) {        // Do 5 times: