<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[RemoteXY community — 2 relay in one switsh]]></title>
		<link>https://forum.remotexy.com/viewtopic.php?id=885</link>
		<atom:link href="https://forum.remotexy.com/extern.php?action=feed&amp;tid=885&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in 2 relay in one switsh.]]></description>
		<lastBuildDate>Sat, 01 Feb 2020 11:33:31 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: 2 relay in one switsh]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=2538#p2538</link>
			<description><![CDATA[<p>tnx bro <br />im sory about your crystal ball <br />frind thats messege after update ( exit status 1<br />&#039;struct&lt;unnamed&gt;&#039; has no member named &#039;SWITCH_1&#039;)</p><p>i feel the code from bigining is error<br />i had make alot of change on it<br />please can make afull code <br />i connect the 2 relay on pin 10 and 11<br />blotooth tx rx on pin 2 and 3</p><p>please make full code for me</p><div class="quotebox"><cite>Guillaume wrote:</cite><blockquote><p>Replace RemoteXY.switch with your own variable, my crystal ball is broken so I can&#039;t see what variable name you used...</p></blockquote></div>]]></description>
			<author><![CDATA[null@example.com (872564)]]></author>
			<pubDate>Sat, 01 Feb 2020 11:33:31 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=2538#p2538</guid>
		</item>
		<item>
			<title><![CDATA[Re: 2 relay in one switsh]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=2537#p2537</link>
			<description><![CDATA[<p>Replace RemoteXY.switch with your own variable, my crystal ball is broken so I can&#039;t see what variable name you used...</p>]]></description>
			<author><![CDATA[null@example.com (Guillaume)]]></author>
			<pubDate>Sat, 01 Feb 2020 10:54:34 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=2537#p2537</guid>
		</item>
		<item>
			<title><![CDATA[Re: 2 relay in one switsh]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=2536#p2536</link>
			<description><![CDATA[<p>exit status 1<br />expected unqualified-id before &#039;switch&#039;<br /></p><div class="quotebox"><cite>872564 wrote:</cite><blockquote><p>Tnx frind i found an error in complate <br />Please can get me the full surce<br /></p><div class="quotebox"><cite>Guillaume wrote:</cite><blockquote><p>Like this<br /></p><div class="codebox"><pre><code>void loop()
{
    static uint8_t switch_PreviousValue = RemoteXY.switch;

    // if switch value changed
    if ( RemoteXY.switch != switch_PreviousValue )
    {
        digitalWrite( pin_relay1, RemoteXY.switch == 0 ? HIGH : LOW  );
        digitalWrite( pin_relay2, RemoteXY.switch == 0 ? LOW  : HIGH );
        switch_PreviousValue = RemoteXY.switch;
    }
}</code></pre></div><p>Maybe need to invert logic, depending if your relays are Active LOW or Active HIGH.</p></blockquote></div></blockquote></div>]]></description>
			<author><![CDATA[null@example.com (872564)]]></author>
			<pubDate>Sat, 01 Feb 2020 09:10:00 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=2536#p2536</guid>
		</item>
		<item>
			<title><![CDATA[Re: 2 relay in one switsh]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=2532#p2532</link>
			<description><![CDATA[<p>Tnx frind i found an error in complate <br />Please can get me the full surce<br /></p><div class="quotebox"><cite>Guillaume wrote:</cite><blockquote><p>Like this<br /></p><div class="codebox"><pre><code>void loop()
{
    static uint8_t switch_PreviousValue = RemoteXY.switch;

    // if switch value changed
    if ( RemoteXY.switch != switch_PreviousValue )
    {
        digitalWrite( pin_relay1, RemoteXY.switch == 0 ? HIGH : LOW  );
        digitalWrite( pin_relay2, RemoteXY.switch == 0 ? LOW  : HIGH );
        switch_PreviousValue = RemoteXY.switch;
    }
}</code></pre></div><p>Maybe need to invert logic, depending if your relays are Active LOW or Active HIGH.</p></blockquote></div>]]></description>
			<author><![CDATA[null@example.com (872564)]]></author>
			<pubDate>Fri, 31 Jan 2020 22:22:05 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=2532#p2532</guid>
		</item>
		<item>
			<title><![CDATA[Re: 2 relay in one switsh]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=2531#p2531</link>
			<description><![CDATA[<p>Like this<br /></p><div class="codebox"><pre><code>void loop()
{
    static uint8_t switch_PreviousValue = RemoteXY.switch;

    // if switch value changed
    if ( RemoteXY.switch != switch_PreviousValue )
    {
        digitalWrite( pin_relay1, RemoteXY.switch == 0 ? HIGH : LOW  );
        digitalWrite( pin_relay2, RemoteXY.switch == 0 ? LOW  : HIGH );
        switch_PreviousValue = RemoteXY.switch;
    }
}</code></pre></div><p>Maybe need to invert logic, depending if your relays are Active LOW or Active HIGH.</p>]]></description>
			<author><![CDATA[null@example.com (Guillaume)]]></author>
			<pubDate>Fri, 31 Jan 2020 21:49:49 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=2531#p2531</guid>
		</item>
		<item>
			<title><![CDATA[2 relay in one switsh]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=2528#p2528</link>
			<description><![CDATA[<p>hi ...<br />I have 2 channel relay modle .. i put in&nbsp; 4 and 5 pin<br />in normaly 2 switch control it</p><p>i need to control it with one switsch .. means if switsh off turn relay number one on <br />and number 2 off , and if switch on turn number one off and turn the number 2 relay</p>]]></description>
			<author><![CDATA[null@example.com (872564)]]></author>
			<pubDate>Fri, 31 Jan 2020 15:34:31 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=2528#p2528</guid>
		</item>
	</channel>
</rss>
