<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>TURNING ON LED IN THINGY:52 ?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/36606/turning-on-led-in-thingy-52</link><description>I want to turn on the LED in Thingy:52 in a particular color if a particular condition is satisfied. How can I address the LED and turn the LED on in the desired color in my program.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 24 Jul 2018 07:06:53 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/36606/turning-on-led-in-thingy-52" /><item><title>RE: TURNING ON LED IN THINGY:52 ?</title><link>https://devzone.nordicsemi.com/thread/141083?ContentTypeID=1</link><pubDate>Tue, 24 Jul 2018 07:06:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4c90a68b-79e0-4daf-94f3-ce47749be647</guid><dc:creator>Bj&amp;#248;rn Kvaale</dc:creator><description>&lt;p&gt;Have you taken a look at the &lt;a href="https://github.com/NordicSemiconductor/Nordic-Thingy52-FW"&gt;Thingy source code yet&lt;/a&gt;? The m_ui.c &amp;amp; m_ui.h files should be helpful for getting started.&lt;/p&gt;
&lt;p&gt;You can set the LED color either via the m_ui_led_set() or via the m_ui_led_set_event() functions:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/**@brief Function for setting the RGB value of an LED.
 *
 * @param[in]   r   Red intensity (0 to 255).
 * @param[in]   g   Green intensity (0 to 255).
 * @param[in]   b   Blue intensity (0 to 255).
 *
 * @note In Breathe or One-shot mode, the intensity will be set via a separate intensity variable.
 * The values entered in these two modes will be treated as binary (Boolean) for each color.
 *
 * @retval NRF_SUCCESS      Operation was successful.
 * @retval Other codes from the underlying drivers.
 */
ret_code_t m_ui_led_set(uint8_t r, uint8_t g, uint8_t b);

/**
 * @brief Function for setting LED color according to predefined events.
 *
 * @param[in]   event_code  Predefined event code.
 *
 * @retval NRF_SUCCESS      If initialization was successful.
 * @retval Other codes from the underlying drivers.
 */
ret_code_t m_ui_led_set_event(ui_led_events event_code);&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>