<?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 Re: LED PWM controlling from HEX color code in IMXRT106S in i.MX RT Crossover MCUs</title>
    <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/LED-PWM-controlling-from-HEX-color-code-in-IMXRT106S/m-p/1526838#M21737</link>
    <description>&lt;P&gt;Thank you so much for your interest in our products and for using our community.&lt;/P&gt;
&lt;P&gt;Sorry for the inconvenience, but we don't have that official specific code example. Although surely there must be many on the web. The PWM_UpdatePwmDutycycle() function takes dutyCyclePercent &amp;lt;= 100 as a parameter, so your equation looks fine. If you are sending white (255,255,255) and you get yellow (255,255,0) then the bluePWMval is not being updated properly.&lt;/P&gt;
&lt;P&gt;Have a nice day!&lt;/P&gt;</description>
    <pubDate>Thu, 22 Sep 2022 15:17:09 GMT</pubDate>
    <dc:creator>_Leo_</dc:creator>
    <dc:date>2022-09-22T15:17:09Z</dc:date>
    <item>
      <title>LED PWM controlling from HEX color code in IMXRT106S</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/LED-PWM-controlling-from-HEX-color-code-in-IMXRT106S/m-p/1524989#M21703</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;In sln_local2_iot_local_demo the LED colour is controlling using RGB_LED_SetColor() function.In this function there are multiple cases(different pwm values) for each colour.I want to add more colours.I want to control the led colour from hex colour code.I tried to convert the hex code of colour(example RGB(255,255,255)) to PWM value by using the below equation&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;redPWMval = hex value of red/255*100&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;greenPWMval = hex value of green/255*100&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;bluePWMval =hex value of blue/255*100&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Then all pwm duty cycle will be updated using the function&amp;nbsp;PWM_UpdatePwmDutycycle().&lt;/P&gt;&lt;P&gt;But I am not getting the colours as expected.Instead of white I am getting yellowish colour.&lt;/P&gt;&lt;P&gt;&amp;nbsp; Is there any method to control RGB LED PWM from HEX code of colours ?&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2022 11:18:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/LED-PWM-controlling-from-HEX-color-code-in-IMXRT106S/m-p/1524989#M21703</guid>
      <dc:creator>jnj</dc:creator>
      <dc:date>2022-09-20T11:18:22Z</dc:date>
    </item>
    <item>
      <title>Re: LED PWM controlling from HEX color code in IMXRT106S</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/LED-PWM-controlling-from-HEX-color-code-in-IMXRT106S/m-p/1525869#M21713</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;Please help me on this.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Sep 2022 12:17:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/LED-PWM-controlling-from-HEX-color-code-in-IMXRT106S/m-p/1525869#M21713</guid>
      <dc:creator>jnj</dc:creator>
      <dc:date>2022-09-21T12:17:11Z</dc:date>
    </item>
    <item>
      <title>Re: LED PWM controlling from HEX color code in IMXRT106S</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/LED-PWM-controlling-from-HEX-color-code-in-IMXRT106S/m-p/1526838#M21737</link>
      <description>&lt;P&gt;Thank you so much for your interest in our products and for using our community.&lt;/P&gt;
&lt;P&gt;Sorry for the inconvenience, but we don't have that official specific code example. Although surely there must be many on the web. The PWM_UpdatePwmDutycycle() function takes dutyCyclePercent &amp;lt;= 100 as a parameter, so your equation looks fine. If you are sending white (255,255,255) and you get yellow (255,255,0) then the bluePWMval is not being updated properly.&lt;/P&gt;
&lt;P&gt;Have a nice day!&lt;/P&gt;</description>
      <pubDate>Thu, 22 Sep 2022 15:17:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/LED-PWM-controlling-from-HEX-color-code-in-IMXRT106S/m-p/1526838#M21737</guid>
      <dc:creator>_Leo_</dc:creator>
      <dc:date>2022-09-22T15:17:09Z</dc:date>
    </item>
    <item>
      <title>Re: LED PWM controlling from HEX color code in IMXRT106S</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/LED-PWM-controlling-from-HEX-color-code-in-IMXRT106S/m-p/1526839#M21738</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/199320"&gt;@_Leo_&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Thank you for the response.But in the sln-local2-iot local demo (sdk), already 8 colours are defined.In that for white colour(example) following are the pwm values given in the sdk .&lt;/P&gt;&lt;P&gt;case LED_COLOR_WHITE:&lt;BR /&gt;redPWMval = 15;&lt;BR /&gt;greenPWMval = 100;&lt;BR /&gt;bluePWMval = 100;&lt;BR /&gt;break;&lt;/P&gt;&lt;P&gt;Hex code for white is 255,255,255 .and corresponding pwm values should have been 100,100,100.but in sdk it is RGB(15,100,100) and why?&lt;/P&gt;</description>
      <pubDate>Thu, 22 Sep 2022 15:26:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/LED-PWM-controlling-from-HEX-color-code-in-IMXRT106S/m-p/1526839#M21738</guid>
      <dc:creator>jnj</dc:creator>
      <dc:date>2022-09-22T15:26:40Z</dc:date>
    </item>
    <item>
      <title>Re: LED PWM controlling from HEX color code in IMXRT106S</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/LED-PWM-controlling-from-HEX-color-code-in-IMXRT106S/m-p/1526857#M21739</link>
      <description>&lt;P&gt;You may want to investigate using HSV to RGB conversion to get the color values you expect.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Here some code that does this: &lt;A href="https://github.com/ratkins/RGBConverter" target="_self"&gt;https://github.com/ratkins/RGBConverter&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Sep 2022 16:47:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/LED-PWM-controlling-from-HEX-color-code-in-IMXRT106S/m-p/1526857#M21739</guid>
      <dc:creator>jackking</dc:creator>
      <dc:date>2022-09-22T16:47:58Z</dc:date>
    </item>
    <item>
      <title>Re: LED PWM controlling from HEX color code in IMXRT106S</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/LED-PWM-controlling-from-HEX-color-code-in-IMXRT106S/m-p/1526875#M21740</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/124808"&gt;@jackking&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;I will check on that.But can you comment on the above mentioned query?why 15 is given instead of 100 for red pwm value to generate white colour?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Sep 2022 17:47:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/LED-PWM-controlling-from-HEX-color-code-in-IMXRT106S/m-p/1526875#M21740</guid>
      <dc:creator>jnj</dc:creator>
      <dc:date>2022-09-22T17:47:34Z</dc:date>
    </item>
    <item>
      <title>Re: LED PWM controlling from HEX color code in IMXRT106S</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/LED-PWM-controlling-from-HEX-color-code-in-IMXRT106S/m-p/1526876#M21741</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/124808"&gt;@jackking&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;I will check on that.But can you comment on the above mentioned query?why 15 is given instead of 100 for red pwm value to generate white colour? I didn't get that logic.my use case is from hex colour code i have to control the colour of the led.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Sep 2022 17:50:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/LED-PWM-controlling-from-HEX-color-code-in-IMXRT106S/m-p/1526876#M21741</guid>
      <dc:creator>jnj</dc:creator>
      <dc:date>2022-09-22T17:50:23Z</dc:date>
    </item>
    <item>
      <title>Re: LED PWM controlling from HEX color code in IMXRT106S</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/LED-PWM-controlling-from-HEX-color-code-in-IMXRT106S/m-p/1526883#M21742</link>
      <description>&lt;P&gt;I don't know the specifics of this use case (I use an external driver chip for my RGB LEDs) or what LED you are using.&lt;BR /&gt;&lt;BR /&gt;I would scope the PWM outputs and see what the change in duty cycle does to the signals and match that to the specific LED datasheet.&lt;/P&gt;&lt;P&gt;I also assume that the LED will have different brightness responses for each of the red, green and blue elements. They are not usually perfectly matched, so the values the example have defined may actually be the best combination to achieve white with the EVK board LED (?)&lt;BR /&gt;&lt;BR /&gt;You might want to start with the the individual colors and measure the relative brightness at different duty cycles and then create a mapping function that gives the best matched values.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Sep 2022 18:01:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/LED-PWM-controlling-from-HEX-color-code-in-IMXRT106S/m-p/1526883#M21742</guid>
      <dc:creator>jackking</dc:creator>
      <dc:date>2022-09-22T18:01:49Z</dc:date>
    </item>
    <item>
      <title>Re: LED PWM controlling from HEX color code in IMXRT106S</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/LED-PWM-controlling-from-HEX-color-code-in-IMXRT106S/m-p/1527358#M21756</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/124808"&gt;@jackking&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;In sln-local2-iot hardware scheme low(0 value) pwm out will turn on the led and high (1 value) pwm out will turn off the led.But in our case High pwm out will turn on the led and low pwm out will turn off the led.Ie just opposite of RGB led hardware scheme in the sln-local2-iot kit.How can I invert the logic in the software to make it work?What all changes should I change in the sdk to make it inverse?Please help me&lt;/P&gt;</description>
      <pubDate>Fri, 23 Sep 2022 11:46:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/LED-PWM-controlling-from-HEX-color-code-in-IMXRT106S/m-p/1527358#M21756</guid>
      <dc:creator>jnj</dc:creator>
      <dc:date>2022-09-23T11:46:14Z</dc:date>
    </item>
  </channel>
</rss>

