<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[RemoteXY community — Can I use Switch to develop some logic and not control a pin?]]></title>
		<link>https://forum.remotexy.com/viewtopic.php?id=558</link>
		<atom:link href="https://forum.remotexy.com/extern.php?action=feed&amp;tid=558&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Can I use Switch to develop some logic and not control a pin?.]]></description>
		<lastBuildDate>Sun, 19 Aug 2018 09:28:55 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Can I use Switch to develop some logic and not control a pin?]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=1758#p1758</link>
			<description><![CDATA[<p>In actual fact, I never use &quot;Snap to pin&quot; at all because if adds the following lines into your code areas...</p><p>#define PIN_switch_1 8&nbsp; &nbsp;// pin number you have &quot;snapped to&quot;</p><p>in Setup :&nbsp; pinMode (PIN_switch_1, OUTPUT);</p><p>in loop() :&nbsp; digitalWrite(PIN_switch_1, (RemoteXY.switch_1==0)?LOW:HIGH);</p><p>... which makes it a &quot;permanent&quot; snap. There may be times when you don&#039;t want the switch to control the pin, so I prefer to create my own control code.</p>]]></description>
			<author><![CDATA[null@example.com (Daba)]]></author>
			<pubDate>Sun, 19 Aug 2018 09:28:55 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=1758#p1758</guid>
		</item>
		<item>
			<title><![CDATA[Re: Can I use Switch to develop some logic and not control a pin?]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=1757#p1757</link>
			<description><![CDATA[<p>Thanks a lot. That&#039;s what I thought.</p>]]></description>
			<author><![CDATA[null@example.com (pinkman3100)]]></author>
			<pubDate>Sun, 19 Aug 2018 09:24:32 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=1757#p1757</guid>
		</item>
		<item>
			<title><![CDATA[Re: Can I use Switch to develop some logic and not control a pin?]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=1756#p1756</link>
			<description><![CDATA[<p>In the configuration of the Switch, just set &quot;Snap to Pin&quot; to &quot;-&quot; {nothing}</p><p>In your sketch you can then write something like...</p><p>if (RemoteXY.switch_1) {<br />&nbsp; your code here<br />}</p><p>There&#039;s no need for any == in the comparison statement, because switch = 1 evaluates as &quot;true&quot;</p><p>or you can use the Switch-Case construct like</p><p>Switch (RemoteXY.switch_1) {<br />&nbsp; case 0:<br />&nbsp; &nbsp; your code here for switch off<br />&nbsp; break;<br />&nbsp; case 1:<br />&nbsp; &nbsp; your code here for switch on<br />&nbsp; break;<br />}</p>]]></description>
			<author><![CDATA[null@example.com (Daba)]]></author>
			<pubDate>Sun, 19 Aug 2018 09:14:51 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=1756#p1756</guid>
		</item>
		<item>
			<title><![CDATA[Can I use Switch to develop some logic and not control a pin?]]></title>
			<link>https://forum.remotexy.com/viewtopic.php?pid=1755#p1755</link>
			<description><![CDATA[<p>I want to process the data (0 for low and 1 for high) from the Switch and develop a logic accordingly in my loop function. Is this possible? I think this will require a bitstream of 1s or 0s according to switch value. Please Help</p>]]></description>
			<author><![CDATA[null@example.com (pinkman3100)]]></author>
			<pubDate>Sun, 19 Aug 2018 06:01:52 +0000</pubDate>
			<guid>https://forum.remotexy.com/viewtopic.php?pid=1755#p1755</guid>
		</item>
	</channel>
</rss>
