Software Archive
Read-only legacy content
17061 Discussions

3_c_onboard_LED_blink - Edison Arduino Code Broken (w/ Fix below)

Manish_P_
Beginner
330 Views

Surprised at the quality of the sample code - what's provided on Intel's site does not work. I have included the fix below in bold (works with libmraa version 0.5.4+ in IDE)

int main(int argc, char **argv) {
    mraa_platform_t platform = mraa_get_platform_type();

    ... <code cut out>

    switch (platform) {
       ... <code cut out>


    case MRAA_INTEL_EDISON_FAB_C:
        strcpy(board_name, "Edison");
        gpio = mraa_gpio_init(10);
        break;

      ... <code cut out>

}

Call mraa_gpio_init with mraa Pin 10 as argument, NOT 13 as in the example. Traced through schematics and Edison pinout to decipher that the LED is connected to DIG13_1P8, which is connected to GP109, which is mapped to mraa pin #10 (the sample had pin #13)

 

 

0 Kudos
0 Replies
Reply