<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic 3_c_onboard_LED_blink - Edison Arduino Code Broken (w/ Fix below) in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/3-c-onboard-LED-blink-Edison-Arduino-Code-Broken-w-Fix-below/m-p/1017541#M36785</link>
    <description>&lt;P&gt;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)&lt;/P&gt;&lt;P&gt;int main(int argc, char **argv) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;mraa_platform_t platform = mraa_get_platform_type();&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; ... &amp;lt;code cut out&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;switch (platform) {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;...&amp;nbsp;&amp;lt;code cut out&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;case MRAA_INTEL_EDISON_FAB_C:&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;strcpy(board_name, "Edison");&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;gpio = mraa_gpio_init(10);&lt;/STRONG&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;break;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; ...&amp;nbsp;&amp;lt;code cut out&amp;gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;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)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 22 Feb 2015 03:38:03 GMT</pubDate>
    <dc:creator>Manish_P_</dc:creator>
    <dc:date>2015-02-22T03:38:03Z</dc:date>
    <item>
      <title>3_c_onboard_LED_blink - Edison Arduino Code Broken (w/ Fix below)</title>
      <link>https://community.intel.com/t5/Software-Archive/3-c-onboard-LED-blink-Edison-Arduino-Code-Broken-w-Fix-below/m-p/1017541#M36785</link>
      <description>&lt;P&gt;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)&lt;/P&gt;&lt;P&gt;int main(int argc, char **argv) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;mraa_platform_t platform = mraa_get_platform_type();&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; ... &amp;lt;code cut out&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;switch (platform) {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;...&amp;nbsp;&amp;lt;code cut out&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;case MRAA_INTEL_EDISON_FAB_C:&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;strcpy(board_name, "Edison");&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;gpio = mraa_gpio_init(10);&lt;/STRONG&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;break;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; ...&amp;nbsp;&amp;lt;code cut out&amp;gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;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)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 22 Feb 2015 03:38:03 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/3-c-onboard-LED-blink-Edison-Arduino-Code-Broken-w-Fix-below/m-p/1017541#M36785</guid>
      <dc:creator>Manish_P_</dc:creator>
      <dc:date>2015-02-22T03:38:03Z</dc:date>
    </item>
  </channel>
</rss>

