The Freedom-K64F is an ultra-low-cost development platform for Kinetis K64, K63, and K24 MCUs.

Bug: Pin names for LED_RED, LED_GREEN, LED_BLUE, LED_RED are wrong

08 May 2014

I believe the pin name for K64F is not correct but I do not the time to trace the schematic and look up the datasheet. Can the developer look info it?

Below is my test program:

#include "mbed.h"

DigitalOut red  (LED_RED);
DigitalOut green(LED_GREEN);
DigitalOut blue (LED_BLUE);

int main() {

    while (1) {
        printf("red\n\r");        red = 1; green = 0; blue = 0; wait(5.0);  
        printf("green\n\r");      red = 0; green = 1; blue = 0; wait(5.0);  
        printf("blue\n\r");       red = 0; green = 0; blue = 1; wait(5.0);
        printf("red+green\n\r");  red = 1; green = 1; blue = 0; wait(5.0);
        printf("green+blue\n\r"); red = 0; green = 1; blue = 1; wait(5.0);
        printf("red+blue\n\r");   red = 1; green = 0; blue = 1; wait(5.0);
    }
}
08 May 2014

I also don't have it, but for all freescale targets the LED pins are low active, so try switching all '1's and '0's around.

09 May 2014

Yes, the LED pins are active low. Thanks.

#include "mbed.h"

DigitalOut red  (LED_RED);
DigitalOut green(LED_GREEN);
DigitalOut blue (LED_BLUE);

int main() {

    while (1) {
        printf("red\n\r");        red = 0; green = 1; blue = 1; wait(5.0);  
        printf("green\n\r");      red = 1; green = 0; blue = 1; wait(5.0);  
        printf("blue\n\r");       red = 1; green = 1; blue = 0; wait(5.0);
        printf("red+green\n\r");  red = 0; green = 0; blue = 1; wait(5.0);
        printf("green+blue\n\r"); red = 1; green = 0; blue = 0; wait(5.0);
        printf("red+blue\n\r");   red = 0; green = 1; blue = 0; wait(5.0);
    }
}
24 Jun 2014

Hi All, DigitalOut red (LED_RED); where is LED_RED defined? LED_RED equal LED1???

24 Jun 2014

genius gogo wrote:

oh,i Got it,it on pinnames.h