<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[RemoteXY community — How to change LED color]]></title>
		<link>https://forum.remotexy.com/viewtopic.php?id=1302</link>
		<atom:link href="https://forum.remotexy.com/extern.php?action=feed&amp;tid=1302&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in How to change LED color.]]></description>
		<lastBuildDate>Thu, 15 Apr 2021 21:20:32 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: How to change LED color]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=3853#p3853</link>
			<description><![CDATA[<div class="quotebox"><cite>barbichonbd wrote:</cite><blockquote><p>Thanks for replying, but I&#039;m very confusing abaout how this works!<br />Could you give me a very simple example of how to display a red led, wait 1 second, change the led color to blue?</p></blockquote></div><p>When you configure an LED on the interface, you can choose 1 to 3 colours, Red, Green, and Blue.</p><p>For each colour you &quot;enable&quot; you get a variable declared in the interface code. Each variable can be sent a value corresponding to the brightness of that colour, 0 to 255.</p><p>More than one colour, you are able to &quot;mix&quot; them.&nbsp; In this example for RGB_led I have configured all 3 colours, and the interface code generates me 3 output variables ...</p><div class="codebox"><pre><code>    // output variables
  uint8_t RGB_led_r; // =0..255 LED Red brightness 
  uint8_t RGB_led_g; // =0..255 LED Green brightness 
  uint8_t RGB_led_b; // =0..255 LED Blue brightness </code></pre></div><p>If you only want Red and Blue, don&#039;t check the Green box in the LED configuration.</p><p>A Red LED would be LED_r = 255, LED_b = 0<br />A Blue LED would be LED_r = 0, LED_b = 255</p><p>If you set them both to 255, you would get Magenta, i.e. Red and Blue mixed.&nbsp; Of course you can use any values in between to get different &quot;hues&quot; and brightnesses.</p><p>Your sketch can write separate values to those variables to produce a total of 256 x 256 x 256 colours, just over 16 million combinations !!</p><p>Don&#039;t use the &quot;delay()&quot; function for waiting, the interface to your phone will almost certainly disconnect. Instead keep a track of elapsed milliseconds. There are loads of tutorials on the internet for doing timing without using delay()</p>]]></description>
			<author><![CDATA[null@example.com (Daba)]]></author>
			<pubDate>Thu, 15 Apr 2021 21:20:32 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=3853#p3853</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to change LED color]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=3851#p3851</link>
			<description><![CDATA[<p>Thanks for replying, but I&#039;m very confusing abaout how this works!<br />Could you give me a very simple example of how to display a red led, wait 1 second, change the led color to blue?</p>]]></description>
			<author><![CDATA[null@example.com (barbichonbd)]]></author>
			<pubDate>Thu, 15 Apr 2021 12:13:43 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=3851#p3851</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to change LED color]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=3844#p3844</link>
			<description><![CDATA[<p>You can use LED element. <a target="_blank" href="https://remotexy.com/en/help/indications/led/">https://remotexy.com/en/help/indications/led/</a></p>]]></description>
			<author><![CDATA[null@example.com (remotexy)]]></author>
			<pubDate>Wed, 14 Apr 2021 04:45:10 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=3844#p3844</guid>
		</item>
		<item>
			<title><![CDATA[How to change LED color]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=3840#p3840</link>
			<description><![CDATA[<p>Hello,<br />I just want simply, change an object color via the sketch.<br />Example a LED would be green if a relay is on , and red if a relay is off. So color changed by the sketch decision.<br />Would it be possible?<br />Thanks</p>]]></description>
			<author><![CDATA[null@example.com (barbichonbd)]]></author>
			<pubDate>Tue, 13 Apr 2021 14:34:34 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=3840#p3840</guid>
		</item>
	</channel>
</rss>
